I’m stuck doing something that seems like it should be kind of simple:
I want to set the absolute position and rotation (about that position) of a given mesh. That is the position should determine the center point of the mesh, and the rotation should determine rotation around that position.
but honestly none of them have made this any clearer.
Setting position is as easy as:
mesh.position = new Vector3(x,y,z)
I have tried applying the rotation with all of the following methods:
mesh.rotationQuaternion = …
But none of them rotate around the position, instead they rotate around 0,0,0. Switching between local and global space doesn’t help either.
What is the ‘right’ approach to doing this? I tried saving the position elsewhere and then applying the inverse rotation to the position but this doesn’t have the desired results at all.