I'd like to change the camera direction out of free aiming using menu buttons on the screen.
I've 4 arrows button (up, down, right, left) as menu buttons.
When Player clicks on one of them I'd like the First Person Camera to move accordingly.
I was planning to do that in the MenuSystem.cs.
Something like:
if((_menu.title == "DirectionsMenu") && (_element.title == "down"))
{
//rotate the camera down
}
What command I could use?
Comments
float rotationY = myCameraTransform.localEulerAngles.x;
rotationY += 1f;
myCameraTransform.localEulerAngles = new Vector3 (rotationY, 0, 0);