Skip to content

Rotation not working properly for Text node #332

Answered by ThomasGorisse
Arun1947 asked this question in Q&A
Discussion options

You must be logged in to vote

Quaternion are not expressed in degrees. You have to use this constructor for Euler Angles:

/**
* Construct Quaternion using an axis/angle to define the rotation
*
* @param axis Sets rotation direction
* @param angle Angle size in degrees
*/
@SuppressWarnings("initialization") // Suppress @UnderInitialization warning.
public Quaternion(Vector3 axis, float angle) {
Preconditions.checkNotNull(axis, "Parameter \"axis\" was null.");
set(Quaternion.axisAngle(axis, angle));
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Arun1947
Comment options

Answer selected by ThomasGorisse
Comment options

You must be logged in to vote
1 reply
@Arun1947
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #331 on March 08, 2022 12:00.