Hello after a long time, I’m back into using BabylonJS to create something.
So far I have a Position Gizmo and a Rotation Gizmo attached to a cube.
When I detect a collision while changing the position of the cube I do this :
cube.position.x -= event.delta.x; cube.computeWorldMatrix();
Which works for 99% of the cases except when I drag too fast but I will look into later. Though if you have any suggestions please care to mention them.
Anyway what would be the equivalent when I’m changing the rotation of the object via the rotation gizmo attached to it ?
Any guides, sources and general direction would be deeply appreciated. I learnt so much with your help during my first project with BabylonJS and I’m now back for more !
P.S. Correct me if I’m wrong but from my minimal understanding, the
computerWorldMatrix() works as a “refresh” so the engine knows again the correct orientation,position,scale of a mesh.