overload-development-community / OverloadLevelEditor

Overload Level Editor
MIT License
8 stars 6 forks source link

Fix quaternion conversion used for light rotation #32

Closed arbruijn closed 3 years ago

arbruijn commented 3 years ago

The ExtractRotation function in OpenTK does not work correctly if the sum of the main diagonal of the rotation matrix is close to -1. This commit adds a fixed ExtractRotation function, with the same fixes that were applied to the Blender function from which it was copied. Also, the lights exporting code is changed to use the fixed function.