I have a series of Object3Ds in a scene that I have created myself from vertices and faces. It should be said that the vertices of these objects can be very far away from the world origin (X and Y values up to 600'000ish). Upon trying to rotate or scale them, they appear to be rotating around the another axis instead of their local center.
Weirdly object3D.translateX (or Y Z) work fine and as expected, as does simply moving the position (i.e:
object.position.x = 10
increments the x position by 10 (away from 0,0,0 local origin).
I am not even entirely sure which axis this object is rotating around. When I moved the geometry to 0,0,0 with object.position that didn't appear to make the object rotate around itself either.
If it is of any use, I have code to get the center of the object ( using:
THREE.Box3().setFromObject(object).center
(although there might be more appropriate ways?))
Indeed I have found this post which has allowed me to rotate (XYZ) around the center point, however I can't find a way to rotate around X Y Z axes individually, only all together.
Are there any solutions? This must be a common thing to attempt to achieve (scaling and rotating objects around their central axes?)
edit: Interestinly I am finding various sources of information implying that rotation is around a local axis, however this doesn't appear to be the case with my geometries! Saying that rotation is around object axis