---
title: "Fix the orientation and pivot of an AI-generated 3D model"
description: "Turn a generated model upright, face its front down the axis your engine expects, apply the rotation and move the origin to the center of its base."
canonical: https://appliedmanifold.com/mesh/fix-ai-generated-model-orientation/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [meshfx](https://appliedmanifold.com/mesh/)
3.  Generated model orientation

# How to fix the orientation and pivot of an AI-generated model

A generated model often faces the wrong way, lies on its side or spins around a point in empty space. Turn it upright, face its front toward +Z for glTF, apply the rotation, and move the origin to the center of its base. Godot, Unity, three.js and Roblox Studio use +Y as up. Unreal Engine uses +Z as up, and its importer converts a +Y-up GLB for you.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [meshfx docs →](https://appliedmanifold.com/docs/mesh/)

[![meshfx crate with its pivot at 0, 0.40, 0 meters, shown in three.js](/shots/meshfx/meshfx-crate-pivot/three-still_800.webp)](https://appliedmanifold.com/shots/meshfx/meshfx-crate-pivot/three-still.webp)

meshfx crate with its pivot at 0, 0.40, 0 meters, shown in three.js

## Why generated models face the wrong way

Generators orient the mesh to match the input image or their own camera, not your engine, so the front can point down any axis.

They also leave the origin at the center of the bounding box. Placed at 0, 0, 0, the model sinks halfway through the floor and rotates around its middle.

## Fix the orientation and pivot by hand

1.  Import the GLB into your 3D editor and look at it from the front view.
2.  If the model lies on its side, rotate it 90 degrees on X until its top points up.
3.  Rotate it around the up axis until its front faces the front view. glTF expects the front to face +Z.
4.  Apply the rotation so the transform reads 0, 0, 0.
5.  Set the origin to the center of the bottom of the bounding box, then move the model so that point sits at 0, 0, 0.
6.  Export a GLB with +Y up. For Unreal Engine, let the importer convert the axes instead of rotating the mesh by hand.

meshfx sets the origin and faces the model down the axis you name in the same compile that lightens it.

## In three.js, Blender and Godot

meshfx puts this crate's origin at the center of its base, 0, 0.40, 0 meters, so it sits on the floor at 0, 0, 0 and loads upright in three.js, Blender and Godot.

[![meshfx crate as a GLB, shown in three.js](/shots/meshfx/meshfx-crate/three-still_800.webp)](https://appliedmanifold.com/shots/meshfx/meshfx-crate/three-still.webp)

Shown in three.js

[![meshfx crate as a GLB, shown in Blender](/shots/meshfx/meshfx-crate/blender-still_800.webp)](https://appliedmanifold.com/shots/meshfx/meshfx-crate/blender-still.webp)

Shown in Blender

[![meshfx crate as a GLB, shown in Godot](/shots/meshfx/meshfx-crate/godot-still_800.webp)](https://appliedmanifold.com/shots/meshfx/meshfx-crate/godot-still.webp)

Shown in Godot

## Use with your agent

Paste the prompt into Claude Code, Cursor or Codex. Your agent connects to Spatial Compiler and comes back with a GLB with the origin where you asked and a report of where it sits.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [Try it in the Playground →](https://appliedmanifold.com/playground/?module=meshfx&cookbook=l_block&spec=8e908f2aff7ecfde46dcc5a579b0cd93a54d5fbe29f03653bf1e757e398e0938)

New accounts start with $5 of usage, and you see the price of each job before it runs.

Agent prompt

Connect the Spatial Compiler MCP server at https://spatialcompiler.dev/mcp if it isn't connected yet. Use meshfx to stand my generated model upright facing +Z, move its origin to the center of its base. Run a Draft first. Your first 50 mesh Drafts are free with the $5 signup credit. Ask before running a final compile.

Or add the server yourself in Claude Code:

`claude mcp add --transport http spatial-compiler https://spatialcompiler.dev/mcp`

[Set it up in Cursor, Codex or another agent](https://appliedmanifold.com/docs/mcp/)

## Related pages

-   [Fix pivot pointMove a model's origin to its base, hinge or axle before export, or offset it inside a parent node in the engine.](https://appliedmanifold.com/mesh/fix-pivot-point/)
-   [Generated model scaleMeasure a generated model against one known dimension, scale it to meters, apply the scale and export a GLB your engine reads at the right size.](https://appliedmanifold.com/mesh/fix-ai-generated-model-scale/)
-   [Generated model normalsWeld split vertices on a generated model, recalculate its normals outward and check every face with backface culling on.](https://appliedmanifold.com/mesh/fix-ai-generated-model-normals/)
-   [Pivot pointA pivot point is the origin a model moves, rotates and scales around, and a wrong one swings doors from the middle.](https://appliedmanifold.com/learn/pivot-point/)
-   [Clean up a generated modelCheck a generated model with meshfx and make it lighter, then import the compiled file into your engine.](https://appliedmanifold.com/mesh/clean-up-ai-generated-model/)
-   [meshfxmeshfx reads an input model, reports surface faults and compiles reduced GLB levels of detail for Godot, three.js or any glTF loader.](https://appliedmanifold.com/docs/mesh/)

[All pages in meshfx →](https://appliedmanifold.com/mesh/)

[← Generated model scale](https://appliedmanifold.com/mesh/fix-ai-generated-model-scale/)[Generated model normals →](https://appliedmanifold.com/mesh/fix-ai-generated-model-normals/)

## Generated model orientation questions

[All questions →](https://appliedmanifold.com/faq/)

### Why does my generated model face the wrong way?

Generators orient the mesh to the input image or their own camera, not to your engine. glTF expects +Y up with the front facing +Z, so turn the model to match and apply the rotation.

### Where should the pivot of a game model be?

For props and characters, put the origin at the center of the base, so the model sits on the floor at 0, 0, 0. Doors and levers pivot at their hinge instead.

### Do I need to rotate a GLB for Unreal Engine?

No. Unreal Engine uses +Z as up, and its glTF importer converts a +Y-up GLB for you. Rotating the mesh by hand as well turns it on its side.
