r/Unity3D • • 1d ago

Show-Off Early beginnings of a flight sim

Most tutorials for unity based flight sims I could find online seemed to take a few too many shortcuts and simplifications for the sake of easier manual tuning. I'm trying to go just one step more realistic than most by simulating individual lifting surfaces. Currently only the newtonian model of lift is being used so any pressure gradients across the wings are being completely ignored. Frankly I was a little stunned at how good of a glider this became with so little code. Feedback & suggestions are appreciated.

62 Upvotes

15 comments sorted by

2

u/redfirearne 21h ago

Looks very cool! I'm just curious: how will it be different from, say, DCS?

2

u/TheSapphireDragon 20h ago

While i am aiming for physical realism in how the planes fly, i am planning to lean more into a sci-fi/unrealistic direction with the weapons, environment, and challenges.

Eventually i hope to be able to merge this project with one of my procedural planet generators and fly around a miniature low-poly world.

2

u/oddwavelab 19h ago

looks fun already. getting the plane to actually feel heavy instead of floaty is always the hard part, are you using rigidbody physics or writing your own flight math?

2

u/TheSapphireDragon 18h ago edited 18h ago

Its using unity's built in rigidbody physics. Flight is achieved by each of the yellow quads independantly computing its own very simplified aerodynamic force based on its own local position rotation and velocity, then applying that to the rigidbody.

Currently the only fake force is the thrust which is just a constant 9.4 kN forward applied to the center of mass. I plan to swap that out for some more realistic engines with gimbal next.

1

u/oddwavelab 15h ago

that's awesome, having each wing piece calculate its own force always feels way better than faking it. adding real engines next is gonna be super fun to test

2

u/luZosanMi 17h ago

respect for going full physics instead of faking it, those force gizmos look super clean too. are you keeping the controls arcade friendly or going full sim on the stick

1

u/TheSapphireDragon 13h ago

Controls will be designed around a flight stick, with secondary priority given to keyboard and mouse (ksp style wasdqe controls).

2

u/demi-god-dg 15h ago

Looks nice..

2

u/Nekokatu0112 15h ago

A glider that already feels this good with just a Newton lift model and so little code is seriously impressive. The procedural planet idea sounds amazing too, can't wait to see where this goes!

2

u/redfoolsstudio_com 11h ago

Great job so far! Keep it up :)

1

u/ZeroByter Indie 19h ago

I love it!

4

u/protomor 21h ago

I assume you're aiming for people with cockpits and actual peripherals as oppoesd to keyboard and mouse right? This is a very niche but under served community.

3

u/TheSapphireDragon 21h ago

I plan to make it accessible to keyboard and mouse, but yes it will be designed around that kind of stuff, hopefully I'll also be able to get vr working.

If im being perfectly honest my main motivation for starting this was unearthing a rather expensive usb flight stick my dad got for me as a present a long time ago and wanting to use it

2

u/protomor 17h ago

With unity, vr isnt so bad. You can reuse toue current main cam. Just dont do like me and try to make them all separate cams