Skip to content

Matrix3x3 to Quaternion Conversion #157

@GreenLightning

Description

@GreenLightning

Hi,

thanks for making a great library!

I noticed some strange rotation in the output from the debug renderer when setting the transform of a body using a Matrix3x3. The problem went away when converting to a quaternion using GLM, so I believe the problem is in the Matrix3x3 to Quaternion conversion. Here is some example code:

Matrix3x3 original(0.001743,-0.968608,0.248589,-0.614229,-0.197205,-0.764090,0.789126,-0.151359,-0.595290); Matrix3x3 converted = Quaternion(original).getMatrix(); std::cout << original.to_string() << std::endl; std::cout << converted.to_string() << std::endl; 

Output:

Matrix3x3(0.001743,-0.968608,0.248589,-0.614229,-0.197205,-0.764090,0.789126,-0.151359,-0.595290) Matrix3x3(0.124709,-0.992193,-0.000000,-0.784941,-0.098659,-0.611665,0.606890,0.076281,-0.791117) 

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions