Each node in jME3 has local and global rotations, which can be expressed in quaternions.

What are they?

Documentation has no clues, about in which state rotations are zero?


jME3 uses a Scene Graph for rendering, which basically means that you have a tree structure of nodes where the leaf nodes are models.

Each level of node can have a different local Position/Scale/Rotation. To calculate the global P/S/R (that is, where a leaf node would actually be rendered) for a node you take it's parents global P/S/R and add that to the childs P/S/R.

In this way you can give a character a weapon, and if you move the character the weapon moves along with it automatically.

More information about jMonkeyEngine3's scene graph can be found here

A quaternion that represents no rotation when is called the Identity quaternion and is (X:0, Y:0, Z:0, W:1).


Local vs. Global coordinate spaces apply to all transforms: position, rotation, and scale. They can be thought of by imagining the movement you do when instructed "turn left" and you are, say, inside a bus facing the back of the bus; does that mean your left, or the left side of the bus? Your local coordinate system defines "left" to your left, but that direction is to the right side of the bus.

Now add in some abstract notion of "left" for the entire world, regardless of which way you or anyone else is facing; that is Global coordinates.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.