I have a problem with rotation of geometries attached to nodes.
I’m getting the same result when I rotate an object in two different ways and I don’t understand why.
These two rotations are
Method 1) node.rotate((float)Math.toRadians(270),(float)Math.toRadians(0),(float)Math.toRadians(90));
Method 2) node.rotate((float)Math.toRadians(0),(float)Math.toRadians(270),(float)Math.toRadians(90));
I thought that the objects are rotated first around the X-axis, then the Y-axis and then the Z-axis.
This seems to be true for method one.
But if so the second method should lead to a different result. But the result is the same.
I’m really confused about this.
Yes, it took some time to make some tests, but now I understand.
But now I have a new problem. I have to convert the angles that I get fom JME with the command node.getLocalRotation().toAngles(angles) to Angles in “my” System which rotates extrinsic in x,y,z order.
But my knowledge in mathematics is not good enough to calculate that. So I’m using a workaround at the moment. Luckily i’m only using 90° angles (so far) and I made a mapping table to get “my” rotation from the “jme” rotation. For Example 270:90:0 in jme is 0:90:90 in my rotation logic. But when I someday have to use “free” angles I will really be in trouble.