Search Unity

How to rotate my camera up and down on the x axis

Discussion in 'Scripting' started by kingmaxlawr, Jul 12, 2020.

  1. kingmaxlawr

    kingmaxlawr

    Joined:
    Jun 8, 2019
    Posts:
    1
    So I am trying to rotate my camera up and down on the x axis. Here is my code
    transform.Translate(Vector3.up * Time.deltaTime * speed * verticalInput);
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909