The y and x axises switched

I have a gameObject, if I move it up, the x axis changes. If I move it left, the y axis changes.
If I directly change the y axis through the transform component, it moves left/right.
Changing the x axis, moves it up or down.
It is the same for rotations and scales. The z axis is normal.
This only happens for this gameObject.
Exiting and entering the project doesn’t fix it.

1 Like

The Transform component shows local stuff.

Scene View can show Global & Local context.

You mean when you change the “local” position on the Transform. This means your Transform has a rotation, likely +/- 90 degrees so this is entirely expected surely?

1 Like

It was a child parent of a gameObject that had a -90 rotation

2 Likes

So it’s completely expected behaviour then.

1 Like

This is super-easy to do inadvertently, such as if you import a huge FBX structure and then try to add your stuff somewhere inside it.

As a general guideline, avoid rotating or scaling any Transform except ones that have no children. This can help keep your main hierarchy of Transforms “pure and clean.”

Yes, there are counter-examples, such as a gun turret, where you want to establish a particular pivot for traverse (azimuth) rotation and then a lower pivot for elevation (raise/lower) rotation.

But generally try to keep everything (1,1,1) scaling and (0,0,0) rotation all the way from the top until the very point you need it in the hierarchy of your prefabs. You will thank yourself in the future. :slight_smile: