I am attempting to rotate an object named "moon" (which is represented as a sphere) using a matrix instead of the moon.rotation.y property. Here is the code I am using:
moon.applyMatrix(new THREE.Matrix4().makeRotationY(Math.PI/100));
The rotation of the object is working correctly, however, I have noticed that the object's initial position has changed unexpectedly:
moon.position.set(30,1,30);
The position now appears to be (0,0,0) instead of the expected (30,1,30).
Could you please explain why executing the rotation line causes the object to be at (0,0,0) instead of its original position?
Thank you.
Best regards,
Jose.