Simple flight simulation application showcasing basic arcball-like physics and sphere collisions. Built using Qt and rendered with OpenGL immediate mode.
The bulk of the logic consists of rendering the scene from the plane's perspective. By keeping track of its position
and rotation
, the Camera View matrix is consstructed as follows:
Plane collisions against lava bombs are Point-Sphere intersection tests. For the floor a distance with an epsillon is checked.
basic-flight/
├── src/ # Source code
├── assets/ # Static assets (.tri and .dem files)
├── basic-flight.pro # QMake project
└── README.md # Project README
qmake
make
bin/basic-flight <initial (x, y, z)>
Example:
bin/basic-flight -33000 3000 2000
Key(s) | Action |
---|---|
A / S |
Pitch down and up by 3° |
Q / E |
Roll left and right by 3° |
W / D |
Yaw left and right by 3° |
+ / - |
Increase and decrease |
X |
Close the application |
- C++:
>= C++17
- Qt:
5.12.x
- OpenGL:
>= 4.0
Newer versions of Qt might work correctly, if no breaking changes that affect the application were introduced.