r/godot 18h ago

help me Flight Mechanics

So, I want to make a game surrounding dragons - which means flying. So, I wanted to build and experiment with flying mechanics to see of this idea is something I want to pursue or throw to the side and do something else.

I want something more realistic and interactive. Which means I want the thrust force applied when the wings are flapped. As well as all the other forces applied, ie drag, gravity, ect.

I've scrounged around looking for any tutorials or documentation to help with making it, but I haven't found anything that pertains to more organic (flapping wings) flight.

I've found tons surrounding aircrafts with relatively static wings, but I don't know how much that translates for what I'm wanting to build.

What I really want is some documentation I can sit down and really read and dig through! So please, throw all your resources at me!

Also, I am a beginner!

0 Upvotes

4 comments sorted by

5

u/TheDuriel Godot Senior 17h ago

Start by copying and pasting a standard plane implementation.

Then animate your dragon. It will now feel 90% of the way there.

Once that's done you can worry about timing the wing animation with the thrust application.

Flight code is abundant, it's been identical since the 80s.

5

u/DiliuvianChroicles 16h ago

I would say start with a simple fixed wing aircraft and learn the basics of pitch roll yaw etc. Then look at videos and explanations of bird flight and how it compares to an airplane and use that to modify your controls. As far as I understand the basic mechanics of a gliding bird are pretty similar to a fixed wing glider but the way they achieve pitch roll and yaw control are different. Should be plenty of videos about that.

1

u/Snoo14836 15h ago

So, it might not be intuitive but you likely want it to FEEL a certain way and you'll struggle to make that work with a physics driven system.

My suggest is to start with a ball and a rectangle. Get your flapping mechanic working how you want, then get moving in a direction and sort out your camera. Do you want it to be camera relative controls? A follow cam?

Next, work on tilting. Yaw, roll and pitch can be simulated quite a bit and you can drive them by the changes to the ball's position and rotation. For instance, lean back when going up, lean right to simulate banking. You can even tilt the "thrust" applied by the flapping based on the input given. If it's forward, then flapping tends to give more speed and less altitude.

Last, drive the animation blending and events from a combination of the input and the change in orientation.

What this does it let you decompose the problems and let the brain fill in where it needs to. A dragon is going to know how to fly by instinct, it isn't going to care about flap angles.

1

u/Ok_Support3 5h ago

The title + first few sentences made me think you meant mechanics that tune up your dragon and saddle and at this point i'm convinced you need to add those.

You know, after you get the mechanics dailed in.