3D Units - shaddatic/sa2b-render-fix GitHub Wiki
The term '3D Units' refers to Ninja's world-space coordinate system.
The X component describes left (-X) and right (+X) directions; the Y component describes down (-Y) and up (+Y) directions; and the Z component describes forward (-Z) and backward (+Z) directions. This differs from 3D coordinates used in other programs, such as Blender or the Source Engine, where Z is the up~down coordinate.
In other words:
- X = (
-infinity~+infinity, left~right) - Y = (
-infinity~+infinity, down~up) - Z = (
-infinity~+infinity, forward~backward)
For the Sonic Adventure games, the world-space unit scale is in decimeters: in other words, 10 world units is 1 meter, and 155 world units is 15.5 meters.
When drawing, 3D units are transformed into View-Space first using the view matrix (which is calculated from the current camera definition) plus any additional matrix transforms that took place before the draw call.