Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Change MouseOrbit angle?

Discussion in 'Scripting' started by Treasureman, Dec 5, 2014.

  1. Treasureman

    Treasureman

    Joined:
    Jul 5, 2014
    Posts:
    563
    Hi
    I have a MouseOrbit script applied to my FPS Controller, but the problem is, the camera centers in on whatever it's rotating around. I want it to ave this camera angle. Screenshot (51).png How would I do this?
     
  2. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,356
    You can create a empty game object as your player attach your actual character as a child of it then move the empty where you wish the camera to focus (ie over right shoulder in this case) . Never done it but should work
     
    ZO5KmUG6R likes this.
  3. Treasureman

    Treasureman

    Joined:
    Jul 5, 2014
    Posts:
    563
    I've tried that before. it ends up rotating around the empty game object, not the character. Sorry.
     
  4. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,356
    Try this youtube video its 5 tutorials on writing a camera script i think the solution you need should be somewhere in there .good luck



    this is part 1