What are mesh.flipFaces(), flipNormals & sideOrientation?

Hello!

About clock and counter clockwise, they are always referenced to the hand coordinate system you’re using:

image

If you align the thumb of your hand with the normal of a face and rotate your hand, you’ll see if the vertices are clockwise or counter clockwise:

image

This video offers a nice explanation about it: (3) [Episode 15] Rendering a Quad (And Understanding Winding Order) - Modern OpenGL - YouTube

Just remember that for the video, it uses OpenGL coordinate system which is right handed, while Babylon is left handed by default.

I think the video will do a better explanation than me to explain why flipFaces and flipNormals are different. Flip faces will flip the winding order (which is the clockwise and counterclockwise thing), while flip normals just reverses the direction of the normal. You can see it on the code here: https://github.com/BabylonJS/Babylon.js/blob/41cb891508d8f008f97e85e206a155a97d296e9f/packages/dev/core/src/Meshes/mesh.ts#L3154