-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Sizes and angles in the game world
The game world is viewed from an isometric perspective. The camera is rotated by 45 degrees and looks down by 30 degrees. This page is dedicated to showing common angles and distances and their mathematical proof. Results on this page have been rounded to 4 decimal places.
For simplicity sake, we'll use 1 as our base unit.
Tile size = 1
The unit height, however, isn't 1. As you may know an object with a unit height of 2 will align it's top perfectly with a tile behind it. We know that our camera is rotated by 45 degrees and looking down by 30. We can calculate the unit height by creating a right-angled triangle where the height is 2 times the unit height, which we want to know, the angle is our vertical camera angle and the adjacent is the diagonal of a tile. We know 2 things about our triangle and thus we can calculate what the height of it is and divide it by 2:
Tile diagonal = 1.4142 = sqrt(1² + 1²)
Unit height = 0.4082 = tan(30°) * 1.4142 / 2
Now that we know our unit height we can start to calculate some of the angles that we see in the for track rides, terrain and scenery objects such as roofs:
Gentle slope angle = 22.2052° = atan(0.4082 / 1)
Diagonal gentle slope angle = 16.1005°
Steep slope angle = 58.5148° = atan(0.4082 * 4 / 1)
Diagonal steep slope angle = 49.1035° = atan(0.4082 * 4 / 1.4142)
The unit height for RCT was not mathematically correct when it comes to the pre-rendered sprites. What the exact value used was is unknown but based on info from Simon Foster it seems like it was eyeballed.
- Home
- FAQ & Common Issues
- Roadmap
- Installation
- Building
- Features
- Development
- Benchmarking & stress testing OpenRCT2
- Coding Style
- Commit Messages
- Overall program structure
- Data Structures
- CSS1.DAT
- Custom Music and Ride Music Objects
- Game Actions
- G1 Elements Layout
- game.cfg structure
- Maps
- Music Cleanup
- Objects
- Official extended scenery set
- Peep AI
- Peep Sprite Type
- RCT1 ride and vehicle types and their RCT2 equivalents
- RCT12_MAX_SOMETHING versus MAX_SOMETHING
- Ride rating calculation
- SV6 Ride Structure
- Settings in config.ini
- Sizes and angles in the game world
- Sprite List csg1.dat
- Sprite List g1.dat
- Strings used in RCT1
- Strings used in the game
- TD6 format
- Terminology
- Track Data
- Track Designs
- Track drawers, RTDs and vehicle types
- Track types
- Vehicle Sprite Layout
- Widget colours
- Debugging OpenRCT2 on macOS
- OpenGL renderer
- Rebase and Sync fork with OpenRCT2
- Release Checklist
- Replay System
- Using minidumps from crash reports
- Using Track Block Get Previous
- History
- Testing