lsalzman / iqm

Inter-Quake Model format development kit
MIT License
244 stars 72 forks source link

non-uniform bone scaling breaks rotations (patch) #27

Open shakesoda opened 5 years ago

shakesoda commented 5 years ago

I ran into this in the version I've been working on for my game.

essentially, Matrix.to_quaternion() produces an invalid result when bones have weird scales on them. fix is to use inverse transpose of upper 3x3 (as one does for normals)

diff: https://github.com/excessive/iqm-exm/commit/c6e05994d121952f2bebd594833c6f17e089c581