godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.05k stars 21.18k forks source link

Mention in the docs that some SurfaceTool related functions only work with PRIMITIVE_TRIANGLES #16208

Closed LunaSquee closed 5 years ago

LunaSquee commented 6 years ago

Godot version: 3.0

OS/device including version: All

Issue description: Recently, I have been working with SurfaceTool and I noticed that some functions don't work with anything but PRIMITIVE_TRIANGLES.

SurfaceTool generate_normals() checks for PRIMITIVE_TRIANGLES explicitly but it isn't mentioned in the documentation. Mesh get_faces() seems to return an empty array when the mesh is not made using PRIMITIVE_TRIANGLES.

There might be more but this is what I've noticed. This could save someone the headache I had when working with procedural meshes and their collisions.

akien-mga commented 5 years ago

Fixed by #22872.