Problems with getWorldMatrix - positions not updated

Note that getWorldMatrix does not take any parameter, so getWorldMatrix(true) won’t force a recomputation: pass true to computeWorldMatrix to force a recomputation.

However, you should not need to force recomputation if you call computeWorldMatrix() for all meshes: the recomputation will be automatically done if it has to be. Still, try to pass true to it and see what happens.

The Scene._evaluateActiveMeshes function, which is responsible for finding the meshes to display and is called by Scene.render => Scene._renderForCamera is simply looping through the meshes and doing:

mesh.computeWorldMatrix();

to update the world matrix of all meshes. So, if you are doing the same you should get the same result.

1 Like