Skip to content

Help with Matrice transformations #3643

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

You must be logged in to vote

rotation(Float3) creates a rotation matrix, it does not decompose the rotation component of a matrix. You can perform the decomposition by calling myMatrix.rotation which gives you a Float3 containing the 3 Euler angles of rotation. You can also get the scale and translation in the same way. We don't have an API to create a quaternion from a matrix but you could just copy/paste that function extractQuaternion. You can get the array of a matrix with toFloatArray().

Memory usage won't be an issue.

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ThomasGorisse
Comment options

You must be logged in to vote
0 replies
Comment options

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

Comment options

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

Comment options

You must be logged in to vote
1 reply
@romainguy
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