Search Unity

Advanced Camera Orbit around target

Discussion in 'Scripting' started by GoRiLLa, Oct 9, 2013.

  1. GoRiLLa

    GoRiLLa

    Joined:
    Oct 8, 2013
    Posts:
    14
    Hi there!

    I'm trying to figure out how I could make a mouse orbit script like they've done here: http://www.byggplanlegger.no/

    This movement differs from the standard Mouse Orbit script in that the camera adjusts its position and rotation smoothly by rotating the local-y axis when scrolling directly over the poles, without suddenly flipping the vectors, turning the camera up-side down or clamping/locking the x-vector (up and down vector).

    I've looked all over the unity forums for a solution with no luck.

    Please help me in the right direction. Do I need to apply a matrix transformation of some kind or is there a simpler solution for this?

    Thanks! :)
     
    Last edited: Oct 9, 2013