Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Rotate around object at an angle.

Discussion in 'Scripting' started by littlelingo, Oct 26, 2006.

  1. littlelingo

    littlelingo

    Joined:
    Jul 18, 2006
    Posts:
    372
    So I have an model on a plane and the main camera pointing down looking at the object from a distance and angle.

    What I am wrestling with is wanting to use key input (which isn't the issue) to rotate the camera around that model and keep the distance and angle as it circles it.

    Could someone please provide some help?

    Thanks!

    -- Clint
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    There is a script called Mouse Orbit in the "Standard Assets/Camera Scripts". You can modify it to use a different input axis instead of the "Mouse X" and "Mouse Y" input axis.
     
  3. littlelingo

    littlelingo

    Joined:
    Jul 18, 2006
    Posts:
    372
    Thanks Joe that helps alot!

    -- Clint