Quaternion Question?

This may me a simple question, but how would I go about

gettting the angle a spatial is rotated at from it, or the quaternion?

I also need the axis it is rotated about?

float Quaternion.toAngleAxis(Vector3f);

it returns the angle and sets the axis to the vector you provide as the parameter.

this should be:

float angle = Spatial.getLocalRotation().toAngleAxis(Vector3f axis);


     * <code>toAngleAxis</code> sets a given angle and axis to that
     * represented by the current quaternion. The values are stored
     * as following: The axis is provided as a parameter and built
     * by the method, the angle is returned as a float.
     * @param axis the object to contain the axis.
     * @return the angle of rotation in degrees.

hth Martin

edit: mojomonk - fast as the speed of light :)

edit 2.: you may also want to look at Spatial.getWorldRotation().
depends on what you want to do


How stupid of me. I did not realize that method was writen

for that purpose.

Thanks again.