Jet/Plane Flight Physics (BGE)

I’ve been working on this project for someone time now where i try to make a jet model fly, but I’ve been having a hard time getting the right physics and controls, and to make it worse i don’t know any python, so please if you can suggest things that i can do in the logic editor but here’s what i have done and i will try and put a .blend in the next postFOR THOSE WHO WANT TO CUT TO THE CHASE START HERE: i have the jet set to static physics, the camera is the parent and the jet is the child, i don’t like that there is basically no gravity because i’m using static physics. When i played flight simulators and you tilted your plane a little bit it would begin to turn, like in real life, but (1) the physics in my game make me have to make a 90 Degree turn and then pull up. Thats the first problem, (2) because i have the camera on static (Controls are set to the Camera Because it’s the Parent) even when i turn my speed down it does not go down with gravity of course. (3) the reason i have the camera as parent is because when the jet is parent the camera goes in a wired circleOverView: the Real Problem is just (1) I added 2 and 3 cuz i i could not remember what i wanted to say but they are still valid problems, also so that you don’t get confused with (2) i do not have python experience therefore i do not have a speed script to go up and down i just changed it in the logic editor. Basically i just want nice realistic Plane Physics so that i can enjoy flying in my game.Any Help will be much Appreciated, Sorry for long text, i type to much LOL.
I’M SORRY I’M SORRY I’M SORRY PLEASE LOOK HERE: I MADE THIS MORE COMPLICATED THEN IT NEEDED TO BE AND I’M EVEN CONFUSING MYSELF PLEASE JUST FOCUS ON HELPING ME SOLVE PROBLEM (1) XD THANKS SO MUCH. THE OTHERS ARE OPPTIONAL

Please mind the Material on the Plane i messed up when i took from the original Scene

Attachments

Blender Help Request #1.blend (7.29 MB)

You can do it with distance constraint actuator.Here is a blend.The cube is dynamic.Press p and then w to see what it does.

Attachments

flying2.blend (474 KB)

for the gravity problem, that would be a yes and no. Yes because it goes up and down no because theres no lift or force that makes it go up or down gradually like a real plane. i do greatly appreciate the help tho, thank you

Use the suspend and restore dynamic actuator ,the state atuator and motion actuator.Here is the blend.Press p then
w then x.

Attachments

flying thing.blend (459 KB)

i think i might be able to work with that, i’m do some testing when i get back home and let you know, Thanks So Much, big help

OKAY, after blowing my mind out a few times, i got it to go up and down (angle) and cylce though the states as if it were landing and taking off.

now i need 3 things to almost if not completly finish the jet (1) a way if possible in logic editor to adjust speed up and down (2) a way to limit rotation so when i rotate, my nose does not go through the ground, i don’t yet know how to use the constraints in logic but i think there might be somthing in there for that i’ll look also, and (3) a rotation trigger for example instead of me pressing x for the dynamics to start, i want it to be pointing down, for more real-ism. if you have anything to add or suggest i’m open because my mind is really twisting XD thanks so much tho i greatly appreciate the help.

here are my adjustments to the scene

Attachments

flying thing.blend (477 KB)

You can simply add more states with different speeds on motion actuators.Then add the logic brick setup that you have to it for each state.That is so that you can excellerate.You can shape the dynamic cube how you like in order to prevent the nose of the plane from penetrating the ground.You want to have the nose pointing to the ground when the engine stops.But that does not happen immediately for a plane.

Ok, i’m take a break for tonight. but this may not be the last time i post if i combine everything well then i’ll ask what you think. But, again thanks so much for the help greatly appreciate it i will try the ideas ad hopfully they work

i know you are set on logic bricks, but just have a look at this simple aircraft physics i whipped up. i personally used to be just like you not long ago(read: earlier this year), but i downloaded some scripts, reverse engineered them, and man, was it ever worth it. i tried to comment the code well.

Have a look at this:

I hope it still runs in recent Blender versions (I did not test it since a long time…).

Ciao.

hey everyone thanks so much for your help and suggestion. this is the improved .blend that I have so far, still many updates needed such as speed, the problem with having to turn at a 90 degree angle is still not fixed, etc…

if you have anymore suggestions for improvement or adding in something I will greatly appreciate it. Thank you

Attachments

Blender Help Request #1.blend (7.25 MB)

You need to have only on the first state logic bricks to switch to the state to cut on aircraft.
And on the state where the aircraft is switched on have logic bricks to switch back to the first state.
I know because i have done this before.You need to have on the second state rotate left and rotate right logic bricks.

never set the AA samples to 16x, most computers bug out at that level or the framerate drops dramatically with little improvement. why its still an option baffles me.

you need yaw assigned to the arrow keys.

did you check resource section?

here: https://blenderartists.org/forum/showthread.php?410067-simple-aircraft-physics-script

ill be adding a logic brick style shortly for all you padawans (read: developer in training). :slight_smile: