(23 Nov 2015, 6:04)Flávio Rebouças Santos Wrote: ...
I noticed that my cube is spinning in the axis-Z unlike axis-X.
This only happens when the angleY is in (HALF_PI) or (PI + HALF_PI).
I suspect that I'm rotating the cube axis and not changing the cube angle.
If this is true so, how I do to, instead of rotating the axes, change the angle of the form?
Hi Flávio,
The SetRotation method directly sets the Euler angles of the transformation matrix of the cube.
The rotation order is ZYX. See also SetRotation
Alternatively you can set the rotation by specifying an axis vector and an angle to rotate the cube around the given axis vector with SetRotation(const Vector & axis, Real angle) or use quaternions to specify the rotation.
You can also nest multiple Transform nodes to sequentially apply transform operations to a node or a set of nodes. The execution order for nested Transform nodes is from inner to outer. Within one Transform node the transformation order is Scale, Rotate, Translate.
If you want to rotate the camera instead, just set the rotation of the CameraTransform node. You can also nest the CameraTransform node within other ordinary Transform nodes.
HTH