Hello, guys. I’m a beginner on three.js. A Local Space problem confused me several days.
I have a glb in Blender, its a WindGenerator, and the three Blades lay on axis Z of its own local axis:
I think the thread starter wants to animate the pitch of each individual blade (local, blue z-axis), not the whole rotor as such.
.
Apparently you were trying to rotate about the “blue” axis, but the blade rotated about the “green” axis. It looks like your coordinate system got flipped. As a pragmatic approach, there are only three possible axes of (local) rotation. I would try each of them and one should do the trick
Understanding why and how the coordinate system got flipped requires disclosure of the way the mesh got created, imported, translated and rotated to produce the screenshots you provided.
Hello vielzutun, thank you for your reply. And my images do not show the whole view of How blades rotates and its my fault, I wanna say that the three blades not only rotate around the green axis, but also in blue and red I think - its a mass:
I already tried all three method: rotateX() rotateY() and rotateZ(), and RotateZ() make them roate aroudn the green axis, but rotateX() and rotateY() just make them rotate strangrly. All can I guess is that the local axis of my object disappear and all of the use the world axis as theri local.
thank you chaser!
I think I nearly got it. Do you mean that if I create a Group and rotate it, then add a Object3d as child, the local axis of Object3D is the rotated world axis, am I right?
It seems you model has different geometries for each blade, that is each blade geometry was copied from the original bleade geometry and then transformed. In the blander you can share a source geometry with several objects, in this case the transforms will applied to the whole objects, not to their geometries. And this approach would also reduce the glb size.
thank you trueshko, do you mean that when I import glb to threejs scene, all the rotation information of their local axis are gone?Am I right?
Thank you again!