Need Help With Biped Bone Rotations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, Im trying to export the rotations of the bones of a biped and its almost working but not quite. I'm using the IGame interface but I also get the original max node for each bone too to see what comes.
For the IGame node I get the LocalTM Matrix for the desired time, get the rotation from this as a quaternion, and then call quat.ToEuler() to finally get the euler representation of the rotation at that point in time. For the MaxNode I just call GetYawPitchRoll(). And I know to subtract the base pose rotation from the results to get the rotation relative to the base pose.
It's so close to working all the way using IGame node, but one axis always comes out weird in tests. I can rotate a bone on the X axis and the results will show the right amount of rotation on that axis. Same goes for the Z axis, but if I rotate on the Y axis I get stuff like -180,-90,180 when it should only be a rotation of 20 degrees on one axis.
Any ideas, or ideas for a better approach altogether?