I don't have any idea how quaternions work...
Is there any simple way to rotate an object 1 degree in relation to its old roatation around its x axis in the api? I just despair...
Why can't you easily rotate by 3 angles?
Quaternions
-
- English / German
- Galveston01
- Thread is marked as Resolved.
-
-
You're looking for euler angles World elements have a convenient method to set the rotation by providing an x, y and z rotation (pitch, yaw, roll): worldElement.setRotation(pitch, yaw, roll)
Remember that you have to provide your rotation in radians, not degree. You can use Utils.MathUtils.degreeToRadians(float) to convert your degree value (0-360) to radians.Alternatively, when working with quaternions, you can call quaternion.fromAngles(pitch, yaw, roll) to build the quaternion from euler angles (again, radians). To convert a quaternion into euler angles, you can call quaternion.toAngles()
-
Oh I think I know where my problem was now Thanks
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!