Advertisement

ROTATION problems Again!!!

Started by July 26, 2000 09:05 AM
1 comment, last by Memir 24 years, 5 months ago
Ok I''ve ran into a little bit of trouble with the Keyframing of Rotations, which are stored as Angle-Axis (x,y,z, Theta)... Inside the .ASE (Ascii Scene Export) file is two rotations: 1,0,0 , 90'' (Rotate by 90 degrees around the X Axis) 0,0,1 , 90'' (Rotate by 90 degrees around the Z Axis) Now the problem is the keyframer should be doing both these operations around the ''WORLD'' axis. But instead, once It performs the first Rotation (90 degrees around the X Axis). The 2nd rotation doesn''t rotate around the WORLD ''Z'' Axis, instead it rotates around the Y Axis, because it''s original Z Axis has been rotated due to the first Rotation. Imagine the Planet Earth, spining around it''s equator (like it does Every day ). Now If I rotate it 90 degrees around a different axis, say one which is perpendicular to the spinning axis. The Earth Still spins around it''s Equator, that is Northern Africa / Mexico etc. places are still spining normally. Instead I want the spining to go around the UNIVERSE AXIS (which never changes) i.e The North Pole, and everything in GMT time zone, The South Pole, and everything in GMT+12 Hours time zone are spining. Is this known as Gimbal lock or something? /Memir
Flash Pool - Pool/Billiards game for Facebook (developed by Memir).
Exact Memir,

Gimbal Lock is defined as an Rotation error due to a previous rotation that has affected the orientation of the object''s axis.

To avoid Gimbal Lock you must use Matrices. If you already use matrices then it''s propably the order of calculation or you use different type of 3D system in your Engine.

Happy Coding,

LowRad
Advertisement
Yep your right... I wrote the original post, pressed Send.. 5 Mins later I realised what was going on. It was down to the order, So I just reversed it. and now... I''ve got a 3D Engine that supports Key-Frames, Detects against slopes does everything

Only one thing really annoys me about Direct3D... The way they use the ''Left hand'' coordinate system. Because I use 3DS MAX r3 to make my meshes, export to .ASE convert to .M3D (Memir 3D format), then Load''em up in Direct3D. But the X Axis is Mirrored exactly.

Is there a Quick way to just mirror this back? E.g a simple setting in direct 3d ?

I tried Mirroring the X coordinates of all the Vertices, which causes Inverse Triangles, so I flip the Triangle order from ABC to CBA in effect. But the mapping coords in one of my meshes was messed up.

I''ll prolly sort it out. I have the fealing that I just need to invert the Object-scale and swap the Tri-Order....

/Memir
Flash Pool - Pool/Billiards game for Facebook (developed by Memir).

This topic is closed to new replies.

Advertisement