Now, as I make some control input, let's say to pitch up by angle alpha, the roll and yaw axis would have to be rotated around the pitch axis by angle alpha. Now, the thing is:
How can I make jME calculate the new Vector3fs for my yaw and roll axis?
Is there a way to rotate an orthonormal vector base using Quaternions?
I just don't get it :? :? :?, please help me if you can!
It might explain quaternions for you, I kinda know they're used to avoid gimbal lock, but that sounds like a throat infection!!! :roll:
I've been using two nodes to rotate vector3f's. If I have a node at [0,0,0] and add a child at my vector3f location, and I rotate the parent by the quaternion, then the world position of the child vector3f will be the result of the rotation on the vector3f:
Node parent = new Node("parent");
Node child = new Node("child");
Vector3f result = child.getWorldTranslation();
To get the pitch, yaw and roll from the quaternion, you can use:
Vector3f pitch = new Vector3f();
Vector3f yaw = new Vector3f();
Vector3f roll = new Vector3f();
Nodes are just a logical concept that jME uses to wrap almost every Object (program not visual). It depends on how you use the Node as to whether it is rendered or not. What I am trying to say is using Nodes to facilitate your program design is on of jMEs greatest advantages. Don't be scared to use an extra Node or two if it makes your life easier, that's what they are there for.