Handedness, Up Axes and Units
A character exported from Blender lies on its back in Unreal. A level imported into Unity is mirrored. A model shows up 100 times too big. Nearly every asset-pipeline bug comes from one of three conventions that engines disagree on: handedness, the up axis, and units.
The conventions
| Tool | Handedness | Up | Forward (of a character/actor) | Units |
|---|---|---|---|---|
| Unity | left | +Y | +Z | 1 unit = 1 meter |
| Unreal Engine | left | +Z | +X | 1 unit = 1 centimeter |
| Godot | right | +Y | -Z | 1 unit = 1 meter |
| Three.js / WebGL | right | +Y | -Z for cameras (lookAt aims a mesh's +Z) |
unitless, usually meters |
| glTF 2.0 | right | +Y | +Z (the front of an asset faces +Z) | meters |
| Blender | right | +Z | -Y ("front" view looks along +Y) | meters by default |
| OpenGL / GLM (default) | right | +Y | -Z (view space) | unitless |
| Direct3D / DirectXMath (traditional) | left | +Y | +Z | unitless |
Handedness is about the arrangement of the axes. Point your thumb along +X and your index finger along +Y; your middle finger shows +Z. With your right hand, +Z comes out of the screen toward you (right-handed); with your left hand it goes into the screen (left-handed). You cannot turn one into the other with a rotation: converting between them always needs a mirror (flipping one axis) or swapping two axes.
What changes and what doesn't
The formulas for dot product, cross product, matrices and quaternions are the same in both systems. What changes is the picture:
- The cross product
X × Y = Zstill holds, but Z points the other way physically, so "is the target left or right" flips its sign. - A positive rotation turns counter-clockwise (looking down the axis toward the origin) in a right-handed system and clockwise in a left-handed one.
- Triangle winding that is counter-clockwise in one system appears clockwise after a mirror, so front faces become back faces.
Converting positions
Between Unity and Unreal both systems are left-handed; only the axis names and units differ. Unreal's X (forward) is Unity's Z, Unreal's Y (right) is Unity's X, and Unreal's Z (up) is Unity's Y. A cyclic swap of axes is a rotation, so no mirroring is needed, just scaling by 100.
Between Unity and Godot/glTF (both Y-up) the handedness differs, so one axis must be negated. Which one is a choice; Unity's glTF importers negate X, and that is the convention used below. Because of the mirror, the triangle winding must also be reversed (swap two indices of every triangle).
#include <iostream>
#include <iomanip>
#include <cmath>
struct Vec3 { double x, y, z; };
double z0(double v) { return std::fabs(v) < 5e-4 ? 0.0 : v; }
std::ostream& operator<<(std::ostream& os, Vec3 v) { return os << "(" << z0(v.x) << ", " << z0(v.y) << ", " << z0(v.z) << ")"; }
// Unreal (X fwd, Y right, Z up, cm) -> Unity (X right, Y up, Z fwd, m)
Vec3 unrealToUnity(Vec3 u) { return {u.y / 100, u.z / 100, u.x / 100}; }
Vec3 unityToUnreal(Vec3 u) { return {u.z * 100, u.x * 100, u.y * 100}; }
// glTF / Godot (right-handed, Y up) <-> Unity (left-handed, Y up): mirror X
Vec3 gltfToUnity(Vec3 g) { return {-g.x, g.y, g.z}; }
int main() {
std::cout << std::fixed << std::setprecision(2);
Vec3 ueDoor{500, -200, 150}; // 5 m forward, 2 m left, 1.5 m up in Unreal
Vec3 inUnity = unrealToUnity(ueDoor);
std::cout << "Unreal " << ueDoor << " cm -> Unity " << inUnity << " m\n";
std::cout << "and back: " << unityToUnreal(inUnity) << " cm\n";
Vec3 gltfHand{-0.3, 1.2, 0.1}; // the right hand of a glTF character facing +Z
std::cout << "glTF " << gltfHand << " -> Unity " << gltfToUnity(gltfHand) << " (still the right hand)\n";
}Unreal (500.00, -200.00, 150.00) cm -> Unity (-2.00, 1.50, 5.00) m
and back: (500.00, -200.00, 150.00) cm
glTF (-0.30, 1.20, 0.10) -> Unity (0.30, 1.20, 0.10) (still the right hand)
Converting rotations
Rotations need care because a mirror reverses the direction of turning. For a rotation matrix, conversion by a mirror S is R' = S * R * S. For a quaternion (x, y, z, w), mirroring axis X keeps x and negates the other two vector components:
mirror X: (x, y, z, w) -> ( x, -y, -z, w)
mirror Y: (x, y, z, w) -> (-x, y, -z, w)
mirror Z: (x, y, z, w) -> (-x, -y, z, w)The program checks the rule: rotating a vector in glTF space and then converting gives the same result as converting first and rotating with the converted quaternion.
#include <iostream>
#include <iomanip>
#include <cmath>
#include <numbers>
struct Vec3 { double x, y, z; };
Vec3 operator+(Vec3 a, Vec3 b) { return {a.x + b.x, a.y + b.y, a.z + b.z}; }
Vec3 operator*(Vec3 v, double s) { return {v.x * s, v.y * s, v.z * s}; }
Vec3 cross(Vec3 a, Vec3 b) { return {a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x}; }
struct Quat { double x, y, z, w; }; // w last, like Unity and Godot
Vec3 rotate(Quat q, Vec3 v) { Vec3 u{q.x, q.y, q.z}; Vec3 t = cross(u, v) * 2; return v + t * q.w + cross(u, t); }
double z0(double v) { return std::fabs(v) < 5e-4 ? 0.0 : v; }
std::ostream& operator<<(std::ostream& os, Vec3 v) { return os << "(" << z0(v.x) << ", " << z0(v.y) << ", " << z0(v.z) << ")"; }
Vec3 mirrorX(Vec3 v) { return {-v.x, v.y, v.z}; }
Quat mirrorX(Quat q) { return {q.x, -q.y, -q.z, q.w}; }
int main() {
std::cout << std::fixed << std::setprecision(3);
// A glTF rotation: 40 degrees around the axis (1, 2, 2)/3.
double h = 40 * std::numbers::pi / 180 / 2, s = std::sin(h);
Quat q{s / 3, 2 * s / 3, 2 * s / 3, std::cos(h)};
Vec3 v{0.5, 1, -2};
Vec3 a = mirrorX(rotate(q, v)); // rotate in glTF, then convert
Vec3 b = rotate(mirrorX(q), mirrorX(v)); // convert both, then rotate in Unity
std::cout << "rotate then convert: " << a << "\n";
std::cout << "convert then rotate: " << b << "\n";
}rotate then convert: (0.942, 1.331, -1.610)
convert then rotate: (0.942, 1.331, -1.610)
Both lines match. Negating the wrong components gives a rotation that looks right for simple yaw-only test cases and wrong for everything else, so always test with a rotation around a diagonal axis like this one.
Units
| Symptom | Likely cause |
|---|---|
| Model is 100× too big in Unity or Godot | exported in centimeters (from Unreal, or FBX in cm) |
| Model is tiny in Unreal | exported in meters, Unreal expects cm |
| Physics feels floaty or too fast | wrong scale: gravity is 9.81 m/s², so a 100-unit-tall "human" falls in slow motion |
| Lighting and shadows look wrong | light ranges and shadow distances are tuned for real-world scale |
Fix scale at export (or in the importer settings), never by scaling the object in the scene: a scaled root multiplies into every child, physics shape and animation.
A practical checklist for imports
- Agree on one source of truth: "1 unit = 1 meter, Y up, character faces +Z" (or the engine's convention), and write it down for the team.
- Export a test asset first: a 1 m cube with a colored arrow pointing "forward" and text on one face. Mirrored text reveals a handedness flip immediately; the arrow reveals the forward axis; the cube reveals the scale.
- Use the exporter's axis options (Blender's FBX "Forward"/"Up" and "Apply Transform", glTF's "+Y Up") rather than rotating objects by hand.
- After import, check: transforms are clean (rotation 0, scale 1), normals face outward, animations play facing the right way.
Tip: When in doubt, look at the engine's built-in gizmo: Unity's and Godot's move gizmos color X red, Y green, Z blue, so you can see at a glance which way +Z points in each.
Test yourself
Which engine is left-handed with Z up and centimeter units?
- Unity
- Godot
- Unreal Engine
- Three.js
Converting between a right-handed and a left-handed system always requires what?
- A 90° rotation
- A mirror (negating one axis) or swapping two axes
- Scaling by 100
- Nothing; they are identical
An FBX character imported into Unity is 100 times too large. What is the best fix?
- Scale the object by 0.01 in the scene
- Fix the units at export or in the import settings
- Move the camera further away
- Change gravity to 981