Overwrite Default Mesh Orientation in Studio?

In the case of uploading your own meshes, the solution is to go back into your 3D editor (Like Blender) and export it again with the adjustments made, but this isn’t an option for toolbox content.

Often times the meshes will be oriented such that the Look/Up/Right Vectors are wrong for the model design. Take this one for example, the Look Vector is facing off to the right:
modelorientation

My first attempt to fix the issue was Edit Pivot, but this only changes how the studio move and rotate widgets interact with it, and any script that modifies the CFrame will not be affected.

The script I’m using assumes that the Y-Axis is Up, Z-Axis is Forward, and rotations are applied in XYZ order, so adjusting to models that are oriented differently requires different axis orders (Like YXZ, ZXY, XYZ) and variables in different spots.

For this model, for example, I need to change the code like so:

-- From this
cfR = CFrame.fromEulerAnglesXYZ(0,turn,bank)
Subject.CFrame = Subject.CFrame * CFrame.new(0,0,-speed*deltaT)
-- To this
cfR = CFrame.fromEulerAnglesYXZ(bank,turn,0)
Subject.CFrame = Subject.CFrame * CFrame.new(-speed*deltaT,0,0)

So I’m just wondering if there’s a good way to edit a toolbox models “internal” rotation, so my code doesn’t need to be restructured each time.

3 Likes

Use PivotTo and GetPivot instead if you want to edit the pivot. Though, in some cases there isn’t an option.

When exporting, you can choose the rotation options and make it persistent.