In a scenario similar to many others, I am seeking assistance on how to make an object move forward in three.js
based on its rotation. The challenge here is that I am unable to utilize object.translateZ due to the interference it causes with the physics simulator I am using. Below is a link to a working example illustrating my issue: fiddle. Please feel free to explore the fiddle and provide your suggested solution in your response.
My goal is for the cube to progress forward by adjusting mesh.position.x
and mesh.position.z
according to mesh.rotation.y
.
It's worth noting that I have encountered peculiarities with three.js
rotations when accessing them via mesh.rotation.y
.
Thank you!