In 3D-View, press “n” to open the properties tab of the selected object (Sorry if I made a mistake in the name of this tab).
Note that the location, scale, and rotation property exists. In the case let’s focus on the rotation (of course :))!
In rotation, there exists the x, y, z axis. (Assume that the z axis of the blender is the y axis of the JME), there is a space with some options (As shown in arrow 1), select the Quartenion option ).
Note that a fourth axis, the “w”, has now appeared. Now the axes of the blender corresponds to the axis of the JME (Again, the z axis of the blender is the y axis of the JME).
Now, press “7” or go View → Top, to be in the top view. Select the model and press “r”, so you can rotate the object. To get more precise, after pressing “r” type “90”, for your model to be 90 °. Now notice how the values of the axes (x, y, z, w) remained.
If you just want to create a quaternion which represents rotation for X degrees around for example Y axis, you can get one by calling:
new Quaternion().fromAngleAxis() which accepts a rotation axis and a rotation in degrees.
Btw for more experienced people, why is fromAngleAxis() not static? Why do I have to create a throwaway quaternion just to make another one?
Cause it invokes fromAngleNormalAxis() which is not static? And it is not static because you have to create instance somewhere not touching reference Quaternion()? (I assume)
No it’s pretty much as it should be. Most Vector3f and Quaternion methods return the object for easy chaining of method calls iirc, which is quite useful all the time.
fromAngles() returns “this” so that you can easily chain things.
fromAngles() is not static so that you can avoid creating a throw-away Quaternion if you already have one… and it follows the pattern already set by a hundred other methods.
@oreganBR you seriously need to see this and this. Don’t touch the Quaternions. You can (and I believe you should) rotate your models as in real life: degrees or radians. I never create Quaternionx like you do in the code.