-1

enter image description here

I would like to move my player not depending on his orientation but the direction of the scene (z of the scene and not z of the rotation)

I really don t know how to do and if this is a good idea...

Iupyou
  • 21
  • 6

1 Answers1

0

I assume by the z of the scene you mean the Global Z-Axis. Just use transform.position to alter the global position. Example:

Vector3 vector = new Vector3(0, 0, 1);
transform.position += vector;

This adds 1 to the GameObject's Z-Axis every time it is run.

Edit: Do you mean in the Scene View? If so then follow these steps:

  1. Find the button under the "Game" View Button called "Local"
  2. Click it and replace it with "Global"
  3. Profit

If you want to reverse it then just reset back to "Local"