- Status
- Offline
- Joined
- Mar 3, 2026
- Messages
- 60
- Reaction score
- 7
Stumbled on this old thread from the other board while looking for some math logic. Everyone asking about 2.5D boxes usually just wants that 3D look without the headache of actual 3D math and perspective scaling.
Basically, you are just drawing a standard 2D box and offsetting it based on the entity's position relative to the camera to give it that "depth" effect. If you are coding this yourself, you do not need to overcomplicate the matrix transformations.
- The Logic: Calculate your 2D bounding box normally.
- The Offset: Add a secondary vertex set that is translated by a small constant or a Z-depth variable to create the trailing corners.
- The Rendering: Connect the front 2D corners to the offset back corners using your overlay renderer.
Keep in mind that if your offsets are not calculated against the FOV properly, it will look like trash when someone is at the edge of your screen.