Something else that I have noticed is if I do the following:
rotation.fromAngles(0, 0, angle);
arrowShape.setLocalRotation(rotation);
When I use the following code to output the angles, I get some strange output.
float yawrollpitch[] = new float[3];
arrowShape.getLocalRotation().toAngles(yawrollpitch);
System.out.printf (“After set: %.2f %.2f %.2fnn”, yawrollpitch[0],yawrollpitch[1],yawrollpitch[2]);
Now, yawrollpitch gives the following output, where input is the angle that was placed in the code earlier:
Input: 0.00 0.00 4.71
After set: 0.00 -6.28 -1.57
What I am wondering, is why does that happen? It’s only supposed to rotate along one axis.
1 Like