Rotation about an arbitrary point

Hello,



I would like to rotate a spatial around an arbitrary 3d point but I would like to avoid to create a pivot node. How it can be done ?


I am not sure I understand exactly what you want, but you can always set the position of the spatial. If you calculate the position with some trigonometry it should be faily straightforward to give the impression of rotation.

Well, I have a geometry which is not created round a 0,0,0 point: all the vertex coords have an offset.

I would like to rotate it about this offset. Something like geom.seLocalRotation(Quaternion q, Vector3f offset).

Well, This can obviously be done, but now I am wondering why don't you want to use another Node for this task. The way to do it is simply to compute yourself (basically implementing the method that would calculate the offset position based on the quaternion) but I don't think that is what you want either.



This is a basic 3D math problem, if you transform the quaternion to a matrix, then you can use the columns to know the coordinate system of your Node, and therefore, after setting the local translation with your quaternion, then you can set the local translation as a linear combination of the 3 columns of the rotation matrix you obtained above… All of this could be avoided and is done for you if you use another node.

Many thanks for your explaination duenez.



Here's the result:




Cheers!

Pretty  :smiley: