guillaumeblanc / ozz-animation

Open source c++ skeletal animation library and toolset
http://guillaumeblanc.github.io/ozz-animation/
Other
2.46k stars 302 forks source link

Add LookRotation for simd math #66

Closed gemSender closed 4 years ago

gemSender commented 5 years ago

It would be nice to add function 'ozz::math::SimdFloat4 LookRotation(ozz::math::SimdFloat4 forward, ozz::math::SimdFloat4 up)' ! Because it's very useful for building quaternion!

guillaumeblanc commented 5 years ago

That's a useful function indeed. Sounds very close to what I implemented for IK aim job. Is it?

If it is, it can probably be moved to the math section indeed. It would make sense to build a Float4x4 version as well.

gemSender commented 5 years ago

Yes. But I use this library for physical games to build character's hit boxes. After local-to-model job, some joints will be selected as boxes's ending and starting points, I neet the function to determine the boxes's orientations, and give it to physx shapes attached to rigidbody as its local rotation.

guillaumeblanc commented 5 years ago

Have you solved your need?

gemSender commented 5 years ago

Have you solved your need?

Yes, i solved this by another way