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.

DarkBASIC Professional Discussion / Aircraft Flight Bank/Roll using EZRotate or Built-In DBP Rotate

Author
Message
Cellbloc Studios
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 11th Oct 2004 02:50
Hello:

I am trying to devise a was for the aircraft to bank/roll into a turn. I would like to roll it the angle amount to the next way point, never to exceed 180 degrees on the Z axis. Here is what I have for my waypoints setup.



I was going to use the Dot Product to get the angle and bank/roll the plane at a set amount of 50 units but depending on the speed, I will change that amount.

Let me know what you think I can do.

Thanks in advance.

-This...is my boomstick!
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 11th Oct 2004 10:38
I've also replied to your e-mail.

Is there a reason that you are trying to limit the amount of roll? Your message said that you didn't want it to exceed 180 degrees on the Z axis (I assume you mean -90 to +90).
If that wasn't the case, you could simply use the EZro_RotateTo command instead of the EZro_TurnPitchTo command.
I am guessing that the reason that you want to limit the angle is to prevent your ship from flying upside down after it makes a turn. What you could do is measure the amount of roll and slowly reduce the roll.

Try replacing your MoveSource function with this:




WOLF

EZrotate!
Tokamak Physics Wrapper!
Cellbloc Studios
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 12th Oct 2004 03:39
Yes, I meant -90/+90. I didn't want it flying "upside down" Your code looks correct, but it's banking the "opposite" way. I will look at it a little more.

-This...is my boomstick!
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 12th Oct 2004 03:57
My bad...
Although this is better than what you had because it uses the least possible angle path (by using 3 axis instead of 2), it dosn't really add the type of banking that you are looking for.
This is more of a physics problem than a rotation problem. Let me think a bit more about it too...

EZrotate!
Tokamak Physics Wrapper!
Cellbloc Studios
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 12th Oct 2004 05:11
Yes. This is one of those "enhancements" I am going to post on your board once I get the examples worked out.

1. Flight Paths with Rolls/Banking (rotate towards center where player is)
2. Troop movements (Take shortest path around an object using RotateTo "player position", like your missile example that shoots you up the tailpipe!)
3. Turret limit axis (so it doesn't flop upside down, you already said your working on that one)

-This...is my boomstick!

Login to post a reply

Server time is: 2025-06-04 17:26:03
Your offset time is: 2025-06-04 17:26:03