I’m trying to set rotation of the object, but none of these aren’t working:
player.transform.rotation = Quaternion.Euler(Vector3(0,-360,0));
player.transform.localRotation = Quaternion.Euler(Vector3(0,-360,0));
player.transform.eulerAngles = Vector3(0, -360, 0);
player.transform.localEulerAngles = Vector3(0, -360, 0);
Debug.Log(player.transform.eulerAngles); // 0, 0, 0
Setting player position is working, but why the angle isn’t change at all?
Also I sawed some weired moment very shortly, when it game starts, it seems player’s rotation has changed but it immediately set to 0, 0, 0.
There is no setting rotation script else, so that’s why I’m asking here. Why is not working?
And I have one more question. Why setting transform in Unity is so hard?
I just want to set initial position and rotation of the object when script starts but both have each serious problem. Position was set totally different place, and Rotation is just not working.
Player don’t have parent, it’s just FPSController that provided default asset by Unity.
I solved position problem with placing invisible empty cube inside of the map and get the position and assigned to player, somehow it works, but rotation is not working at all.
Is there a something huge misunderstood about manipulating object’s transform?