I want to rotate a cube shaped model by one of its edge. I did the following code.
Node dice;
Quaternion x0 = new Quaternion();
x0.fromAngleAxis(0, new Vector3f(0, 0, 1));
st.setRotation(0, 0, x0);
Quaternion x180 = new Quaternion();
x180.fromAngleAxis(FastMath.DEG_TO_RAD * 90, new Vector3f(0, 0, 1));
st.setRotation(0, 3, x180);
dice.addController(st);
but all I got is a rotation about axis originated from center of the object.
Anyone know how to make my dice rotate about one of its edge?
Thanks