hi,
I want to have a spatial rotate about a axis, and I do the following code:
SpatialTransformer st = new SpatialTransformer(1);
Quaternion x180 = new Quaternion();
x180.fromAngleAxis(FastMath.DEG_TO_RAD * 180, new Vector3f(0, 0, 1));
pivot.addController(st);
rootNode.attachChild(pivot);
st.setRotation(0, 2, x180);
In line
x180.fromAngleAxis(FastMath.DEG_TO_RAD * 180, new Vector3f(0, 0, 1));
what I got is a rotation about the z axis, but I want to have a rotation about a parallel line of z axis but not z axis itself.
Do you guys know how to do a rotation about a vector not start from origin?