transform.Rotate having no effect
In my first person shooter game I want my player to look up at enemy face(enemy is giant who is bigger than player) when player is dying. I do this by transform.Rotate(-100, 0, 0, Space.World). This works fine. But in my game I have to disable player move control to helicopter and again enable player. When I switch from helicopter to player transform.Rotate(-100, 0, 0, Space.World) stops taking effect. To confirm that problem is due to player enabling and disabling I did this. Spawn the player and use button press to rotate player if(Input.GetKey(KeyCode.Space)) { transform.Rotate(-100, 0, 0, Space.World); }
This works fine. But when in the inspector I disable player and enable him again above code stops having any effect. Player can look anywhere with mouse but rotation script has no effect. I am new to unity, is there anything i am not doing properly?