Rotation in Jme3

How is Rotation Counted in JME? I Mean in What Unit?
say If the cam.getDirection() is a Vector3f(0, 1, 0), How Much is it rotated?
Does 1=90d, 180d, 360d? Or is it in radians?
Or some other Unit? - then how much is 360?
Thank you.


try to check the wiki and explaination for (JME) math and rotation.

Rotation: ← your questions is answered there with explaination and examples. So I dont try to redo it with own words here.

And Math in general


A vector is a vector. So its not rotated. (Rotated towards what) its “coming” from a origion (cam position) and from there it shows to (0,1,0).

oh Alright!
Anyway, the direct answer (Nothing wrong with @Aufricer 's answer) to my question is that Quaternions (Not Vector3fs) Use radians.

Quaternions are 4 values things that are not understandable until you do its math.

Dont even try understand Quaternion values, you can only understand Vector3f values.

you have something like “FastMath.DEG_TO_RAD”

Here is example for single axis(you can also use vector for 3 axis):

new Quaternion().fromAngleAxis(rotation*FastMath.DEG_TO_RAD, Vector3f.UNIT_Y); 

Yeah, Quaternions in their simplest form are objects that create algorithms to perform rotation actions, starting from an axis (represented by a vector) and adding on to that axis using an angle.

EDIT, you can use this platform too for visualizing things :

Some general conventions used in JME3:

  • angles are in radians
  • +Y points upward
  • +Z points forward (but note that the default camera is initially pointed in the -Z direction)
  • coordinate systems are right-handed (+X cross +Y = +Z)
  • rotation quaternions and direction vectors are normalized (no units)
  • the ordering of vector/quaternion components is (X, Y, Z, W)

Thanks again!

1 Like