You’re running both rotateOnAxis and applyAxisAngle, try running applyAxisAngle once as it will be recursively adding to the rotation angle then just run rotateOnAxis in the loop…
Sorry, I checked a few codepen-like solutions, but could not find any that allows assets uploading for free. I do need to upload my gltf model, as I can’t think of another minimal test case right now…
FWIW, the model is here and the standalone html file is here.
no problem @arielm ,
it’s quite bad practice to recursively create new objects inside a loop, you’ll be creating somewhat of a memory leak in that there’s only so many new vectors and quaternions you can create before reaching a memory limit, i would create these objects as global references to reuse and update as needed…
there’s likely a clever solution to applying the quaternion to the position to prevent gimbal lock but have you considered using a simple object hierarchy to achieve the same? i’ve attached a pen where simply adding a new object3D to add the wheel to and translating the geometry of the original wheel object to a 0 origin you can control the x rotation from the wheel object and the y rotation from the new containing object…
otherwise, if applying quaternions is essential let me know.