Search Unity

Unity Third Person Controller and Third Person Camera scripts converted to C#

Discussion in 'Scripting' started by psychicparrot, Jun 6, 2013.

  1. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    884
    Just incase anybody else needs them, I've posted C# conversions of the Unity 3rd person controller and 3rd person camera scripts on my blog here (those javascript third person character controller scripts you get with Unity)

    Or, if you don't want to read about it you can just grab the scripts here instead :)

    Enjoy!
     
  2. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    500
    Thanks!
     
  3. enzoravo

    enzoravo

    Joined:
    Jun 25, 2013
    Posts:
    284
    thanks for the conversion !
     
  4. derekwsparks

    derekwsparks

    Joined:
    May 29, 2013
    Posts:
    4
    I looked on the blog for a way to contact you but didn't see a contact button. Is the camera and movement scripts improved or just converted. With the traditional camera controller id like to be able to hold the right mouse button to turn the camera not just be able to move the mouse to move the camera. The point being want to have a curser that I can click on things.
     
  5. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
  6. padmalcom

    padmalcom

    Joined:
    Oct 27, 2013
    Posts:
    8
    Hi Jeff, thanks for the code. I'm not quite sure if it is a bug or not. I assign the ThirdPersonController to a capsule and the ThirdPersonCamera zu my camera. Then I drop the player into the Camera Transform variable. But the script keeps telling "Please assign a target to the camera that has a ThirdPersonController script attached.".

    Edit: I had to assign the camera script to the player as well and not to the camera. Problem solved.
     
    Last edited: Dec 24, 2013
  7. jpHacks

    jpHacks

    Joined:
    Jan 19, 2014
    Posts:
    1
    Indeed, this is also the case with the default UnityScript 'ThirdPerson Camera' script. I first dropped the script in the main camera and received the "Please assign a target to the camera that has a ThirdPersonController script attached" error. It wasn't easy to figure out that I had to attach it to the Player object...
     
  8. Falcon541

    Falcon541

    Joined:
    Apr 27, 2015
    Posts:
    1
  9. D11 Empire

    D11 Empire

    Joined:
    Jul 7, 2015
    Posts:
    1
    hi, i can't download this script, they have an error and they write not found thank you