randomPoison / gunship-rs

An experimental game engine written in Rust.
MIT License
27 stars 3 forks source link

Quaternion::look_rotation() Does Not Produce Correct Result #6

Open randomPoison opened 9 years ago

randomPoison commented 9 years ago

Right now Quaternion::look_rotation() produces a quaternion that looks in the correct direction but does not have the correct up vector. The fix should be simple, just calculate the necessary rotation about the new forward vector to correct any error.

randomPoison commented 8 years ago

To be clear: My proposed solution (manually correct the orientation to have the right up vector) should work but I don't know if it's best way of handling this. Whoever works on this should do some research to determine what the "correct" way of calculating look rotation with quaternions is.