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 / Turning in flight problem.

Author
Message
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 27th Oct 2009 19:01
Well, basicly, is there a way to make my plane rotate along the world axis, without having it turn to the right when I'm going north, and turn to the left when going south. Because when using dbTurnObjectLeft, the flight runs smooth, exept that first A is to the left, and when I make a 180* turn ut turns to the right when pressing A, and because I roll my plane ( dbRollObjectLeft or something ) I can't rotate it along its own axis, for my plane starts to decent ( because its rotated along its Z axis, the Y axis is not upwards anymore but in an angle ).

I hope I described my problem enough for you to help me.

Isocadia.

PS: Here is my code, if you find anything that could be improved, please tell me:

entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 28th Oct 2009 15:28
You can't do this using regular Euler angles. You have two options, really:

1) Get the EZRotate plugin available from the TGC store. It uses quaternions or matrix rotation to achieve what you need and then converts it into Euler for you.

2) Use the built-in DirectX matrix or quaternion math, but this requires that you know how to use that math in the first place. Most of the leg-work is done by DX, but you'll have to know how to use it.

I personally prefer EZRotate for the sole reason that it's... Well. EZer.
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 28th Oct 2009 18:46
K, but I can't spend money on that kind of things, so I guess I will need to leave it this way until I can use DX.

Thanks for your help,

Isocadia

Login to post a reply

Server time is: 2024-11-20 11:22:02
Your offset time is: 2024-11-20 11:22:02