https://github.com/spicycactuar/basic-flight
Basic arcball-like flight simulator
https://github.com/spicycactuar/basic-flight
computer-graphics cpp matrix-transformations opengl qt5 render-loop
Last synced: about 1 month ago
JSON representation
Basic arcball-like flight simulator
- Host: GitHub
- URL: https://github.com/spicycactuar/basic-flight
- Owner: SpicyCactuar
- Created: 2024-11-05T02:12:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-20T22:52:45.000Z (over 1 year ago)
- Last Synced: 2025-04-10T23:55:32.064Z (about 1 year ago)
- Topics: computer-graphics, cpp, matrix-transformations, opengl, qt5, render-loop
- Language: C++
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```plaintext
basic-flight/
├── src/ # Source code
├── assets/ # Static assets (.tri and .dem files)
├── basic-flight.pro # QMake project
└── README.md # Project README
```
## Build
```bash
qmake
make
```
## Run
```bash
bin/basic-flight
```
Example:
```shell
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.