Hello I want see the normal of my object but the normal is not at the position of the object.
I’ve creat exemple for you
Hello @LeoPaulD , how are you?
The correct way to do that would be to transform the vertex positions using the model’s world matrix, this way you can get the positions in world space and they will properly follow the mesh if it changes position or rotation.
I have updated your playground sample with that fix:
normals | Babylon.js Playground (babylonjs.com)
However, the model Elf.gltf will always be displayed wrongly since its vertex will also be influenced by the skeleton. The skeleton influence on the vertex position is something that will only be calculated in the shader, so you will not be able to get the correct vertex positions from getVerticesData. This is why this model’s normals will not be properly displayed even in the Playground inspector.
For non-skeleton meshes the sample that I provided should work fine.
Thanks very much this code is perfect for my and for my environnement.
Have a good day