-
newb of many sorts
[RESOLVED] 3d rotation, calculating orientation
This is kind of complicated, so I'll explain with a visual scenario...
Say that there's a ping-pong ball with a needle sticking out of the top of it.
If you were to rotate the ping pong ball 90 degrees along the X or Z axis, then the needle would be horizontal (or parallel to the plane).
Here's where my brain starts to hurt...
If you rotate all three axises at the same time, how then would you calculate when the needle become horizontal, or passes into the southern hemisphere of the pingopong ball?
Search first, asked questions later.
-
newb of many sorts
Okay, I got it figured out.
What I should have mentioned before is that the rotations were calculated from papervision's Matrix3D class.
After a good night's sleep, I realized that all I needed to do was roll the ping-pong ball back to a rotationZ of 0, then I can look that the rotationX to determine which hemisphere the needle is in.
Thanks to anyone who racked their brains over this
Search first, asked questions later.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|