Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / problems with rotation - dbXRotateObject & dbRollObjectRight

Author
Message
Novas
16
Years of Service
User Offline
Joined: 23rd Jul 2008
Location:
Posted: 23rd Jul 2008 21:21
Hi everybody!
i'm trying to rotate an object around the (world's) x-Axis and (the object's) z-axis.

the help said: use void dbXRotateObject ( int iObject, float fX )
sounds good...

to make my object turn around itself i found out that i can use turn, pitch and roll. tried all of them - roll seemed to be the right function for me.

i thought i could use just one first and afterwards the other one...
but it just doesnt work.

the moment i add dbXRotateObject - my object doesn't turn around itself any longer.

i don't understand why.
hope you can help me

here's my code:

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 24th Jul 2008 12:26
'Rotate object' functions perform the rotation around global axis (fixed ones).

'Turn, roll, pitch object' functions perform rotation around local axis (fixed with the object itself, they rotate together.)

If you perform a global rotation, it overrides any previous local rotations, to match the angle with the global axis (as requested).

Do all global rotations before the local ones.
Novas
16
Years of Service
User Offline
Joined: 23rd Jul 2008
Location:
Posted: 24th Jul 2008 15:25
thanks!
Quote: "If you perform a global rotation, it overrides any previous local rotations"

that helped a lot...
so easy to fix...




thanks again for the quick help
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 25th Jul 2008 12:23
Glad you got it working

Login to post a reply

Server time is: 2024-09-30 03:23:38
Your offset time is: 2024-09-30 03:23:38