This is a simple 3D airplane simulation built with the Ursina Engine. It allows players to control an airplane in a limited 3D environment with basic physics, camera zoom, and HUD indicators for speed, altitude, roll, vertical speed, and compass direction.
-
3D Map: Loaded from a GLB model (
assets/map/object.glb) with invisible walls to prevent leaving the play area. -
Controllable Airplane: Loaded from a GLB model (
assets/airplane/object.glb) with smooth forward motion, roll, pitch, and yaw. -
Camera: Third-person view that follows the plane, adjustable zoom with
QandE. -
HUD: Displays real-time speed, altitude, vertical speed, compass, roll, and game status.
-
Physics: Basic gravity, lift, collision response, and acceleration/deceleration.
-
Controls:
W- Increase speed / Start gameS- Decrease speedA- Yaw leftD- Yaw rightQ- Zoom outE- Zoom inR- AscendT- DescendZ- Roll leftX- Roll right
- Install Python 3.10+.
- Install required libraries:
pip install -r requirements.txtRun the simulator with:
python main.pyThe game starts paused. Press W to start controlling the airplane.
- The simulation currently has invisible walls to prevent the airplane from leaving the map.
- Collisions with walls or ground will affect speed, vertical speed, and rotation randomly to simulate impact.
- Camera zoom is limited between -10 and -200 units.
This project is open-source and free to use. Textures and models should comply with their respective licenses.
Disclaimer: The plane may sink into the map or behave unpredictably if collision detection fails. Apologies for any rough textures or placeholder models.
