risecreature Posted August 6, 2013 Posted August 6, 2013 I have models animation data with quaternions of rotation. How can I rotate model using this quaternion using C++ ? Thanks Quote
Josh Posted August 7, 2013 Posted August 7, 2013 I think there's a commend like SetQuaternion. Why would you want to do this? Quaternions are not very intuitive at all. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
risecreature Posted August 8, 2013 Author Posted August 8, 2013 I am just porting data from one engine to another, actually from AGK, and all limbs of model rotated by quaternion. It's not intuitive, but historical, I had no option here. Quote
Josh Posted August 8, 2013 Posted August 8, 2013 This undocumented function can be used: void SetQuaternion(const Quat& q, const bool global=false) The Quat constructor is like this: Quat(x,y,z,w) If the results don't look as you expect, try multiplying the w value by negative one. You can also just use the Vec3 constructor to convert a Quaternion into a Euler angle: Vec3::Vec3(const Quat& q) Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.