My current code attached to the Player One RigidbodyFPSController in Standard Assets is as follows:
// Update is called once per frame
void Update () {
//rotate the player with Q and E
if (Input.GetKeyDown("q"))
{
transform.Rotate(0, 90, 0);
}
if (Input.GetKeyDown("e"))
{
transform.Rotate(0, -90, 0);
}
}
However, when actually pushing the buttons, the player seems to snap back to how they were facing and not rotating. How do I get it to do what I want?