Skip to content

SpicyCactuar/basic-flight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Flight

basic-flight

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:

$C = R^T * -T$

Plane collisions against lava bombs are Point-Sphere intersection tests. For the floor a distance with an epsillon is checked.

Project Structure

basic-flight/
├── src/                 # Source code
├── assets/              # Static assets (.tri and .dem files)
├── basic-flight.pro     # QMake project
└── README.md            # Project README

Build

qmake
make

Run

bin/basic-flight <initial (x, y, z)>

Example:

bin/basic-flight -33000 3000 2000

Controls

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

Technologies

  • 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.

Releases

No releases published

Packages

No packages published