Rotations again
Hey guys. Im getting annoyed by this little thing.
It''s the rotations. Im just starting on a car racing game and need a good way to describe the rotation of the car, and a good way of manipulating the cars rotation. Right now I haven''t got a clue. If I want to rotate the car 0.2 radians around it''s Y-axis for example, it must rotate around the already rotated Y-axis. Right now the rotation always rotates around the worlds Y-axis if the Y-axis-to-matrix-calculation-stuff isn''t first in line. But of course if I move the Y-axis matrix stuff first, then the other axis''s will stop working.
I am really desperate to solve this, it''s for my exam project. I still have 11 weeks or so to complete it, but without this I can''t even start doing any car physics and stuff. So, is there any one of you mathguys out there that can help me? Should I perhaps use quaternions?
Some sample pseudo-code or anything would be a big help.
Thanks in advance,
Lantz
October 28, 2001 10:16 PM
which graphics api are you using?
i use opengl and i can load my own transformation matrix.
i know nothing of d3d.flipcode has a nice article on understanding the rotations and calculating your own transformation matrix.
i use opengl and i can load my own transformation matrix.
i know nothing of d3d.flipcode has a nice article on understanding the rotations and calculating your own transformation matrix.
There are some kinds how you can Rotate Objects
by a Matrix
by a Quaterion
by Euler Angles
Every thing has some Advantages and Disadvantages...
OpenGL uses a Matrix because it is fast to calculate and Saves Processor Power
Quaterions ( i don''t understand them) are great beacause u can rotate on a SPhere oder Sleerp Smooth between 2 Rotations
Euler Angles ... are easy to use & to Understand... but there are some Disadvantages ( Gimbal Lock )
I would prefere to Use Quaterions, i think there are some great Tutorials on the Web...
You don''t need to understand them just use them *g*( is the Easyest way *g* )
J@nkey
by a Matrix
by a Quaterion
by Euler Angles
Every thing has some Advantages and Disadvantages...
OpenGL uses a Matrix because it is fast to calculate and Saves Processor Power
Quaterions ( i don''t understand them) are great beacause u can rotate on a SPhere oder Sleerp Smooth between 2 Rotations
Euler Angles ... are easy to use & to Understand... but there are some Disadvantages ( Gimbal Lock )
I would prefere to Use Quaterions, i think there are some great Tutorials on the Web...
You don''t need to understand them just use them *g*( is the Easyest way *g* )
J@nkey
J.A.N.K.E.Y.: Journeying Artificial Nocturnal Killing and Exploration Youth
Alright, quaternions it is. I've looked through some articles but found nothing useful. So, how does using quaternions solve my problem? How should I use them?
Edit: I did some testing now and actually got all the rotations use the world's axis's instead of the objects. That could be useful I think.
Edited by - Lantz on October 29, 2001 7:39:28 AM
Edit: I did some testing now and actually got all the rotations use the world's axis's instead of the objects. That could be useful I think.
Edited by - Lantz on October 29, 2001 7:39:28 AM
try checking this out ...
http://www.gamedev.net/community/forums/topic.asp?whichpage=1&pagesize=20&topic_id=54563
http://www.gamedev.net/community/forums/topic.asp?whichpage=1&pagesize=20&topic_id=54563
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement