Search Unity

Leap Gesture rotate camera around object

Discussion in 'Scripting' started by haukesand, Mar 2, 2015.

  1. haukesand

    haukesand

    Joined:
    Mar 2, 2015
    Posts:
    5
  2. haukesand

    haukesand

    Joined:
    Mar 2, 2015
    Posts:
    5
    Basically what I am asking is how can I lock the camera to rotate around one object only and to look always at it.
     
  3. isabelb90

    isabelb90

    Joined:
    Jul 6, 2015
    Posts:
    1
    Hi, I would like to do the same. Did you find a solution?
     
  4. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
    I believe that transform.RotateAround() was built to do exactly this kind of thing. This may or may not have to be combined with some form of transform.LookAt(objectPosition) to keep the camera facing exactly the right direction.