Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Stewer - thanks for your code sample. And YES - I noticed it's only a problem when the object is scaled! I ended up simply extracting the rotation matrix from the world matrix. Although I noticed you've got a different way removing the scale from the WorldMatrix - which I need to lok at. Anyway, thanks again.
Creator of PoserPhysics
Creator
of OctaneRender
for Poser
Blog
Facebook
[bookmark]
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
OK, I've been working on a major Poser application, and been stuck on a roation problem from about a week now. To cut a long story short, I'm trying to get a rotation matrix from a quaterion from Actor.WorldQuaternion. Now I've tried a number of methods for converting the quaternion to a rotation matrix - including http://www.flipcode.com/documents/matrfaq.html#Q54. The rotation for the X and Z axes is comes out ok, but not the Y Axis. So I did some tests.... A prop with 10 degrees X Rotation gives a Quat of (1.575, 0.1378, 0.0, 0) - where the tuple is ordered W, X, Y, Z. 10 degrees Z rotation gives (1.575, 0.0, 0.0, 0.1378) - notice the same magnitude, and X now at Z. But 10 degrees of Y rotation gives (1.571, 0.0, 0.2210, 0.0) Notice the magnitude has changed, and the Y variable is not the same as X/Y in the previous examples. Converting the 10 degrees Y rot quat into a rotation matrix and then working out the euler angles introduces a 2-3 degree error in the Y rotation. But it only happens on the Y rotation - X and Z are ok. Anyone got any thoughts on this?
Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook