Flight Simulator in BEPU physics
Posted: Sun Oct 09, 2016 9:07 am
Let's say we want to simulate flight within a BEPU physics simulation for some insane reason.
How would one go about doing this?
(This would make a great demo for BEPU btw)
In particular, conservation of velocity through a rotation. When a plane or gliding winged object rotates, it tends to have velocity in the new direction, rather than simply barreling forth in its previous direction entirely.
How would one simulate this?
Doesn't need to be incredibly accurate - in fact, a more "arcade game" like simulation is preferable for the most part.
Let's start with basics: we have:
- A plane entity
- Thrust
- Brakes
- We're either in the air with starting velocity already or can reasonably get into the air with velocity
Where would one go from here?
I've looked for flight simulator code samples, but it's always /massive/ projects (usually in C or C++) that I can't quite trace my way through :/
(NOTE: The massive part is from having model loading, rendering, control input, menus, dynamic environments, yadda yadda yadda etc. that occupy far more space than wherever the actual movement physics calculations are)
(Note: My actual project at hand is a bit more complex than this and doesn't quite require flight sim stuff, but I'm throwing this part in with the hopes of entertainment)
How would one go about doing this?
(This would make a great demo for BEPU btw)
In particular, conservation of velocity through a rotation. When a plane or gliding winged object rotates, it tends to have velocity in the new direction, rather than simply barreling forth in its previous direction entirely.
How would one simulate this?
Doesn't need to be incredibly accurate - in fact, a more "arcade game" like simulation is preferable for the most part.
Let's start with basics: we have:
- A plane entity
- Thrust
- Brakes
- We're either in the air with starting velocity already or can reasonably get into the air with velocity
Where would one go from here?
I've looked for flight simulator code samples, but it's always /massive/ projects (usually in C or C++) that I can't quite trace my way through :/
(NOTE: The massive part is from having model loading, rendering, control input, menus, dynamic environments, yadda yadda yadda etc. that occupy far more space than wherever the actual movement physics calculations are)
(Note: My actual project at hand is a bit more complex than this and doesn't quite require flight sim stuff, but I'm throwing this part in with the hopes of entertainment)