Search Unity

Customize First Person Controller

Discussion in 'Editor & General Support' started by gregtom6, Aug 7, 2011.

  1. gregtom6

    gregtom6

    Joined:
    May 26, 2011
    Posts:
    56
    Hy all!

    Where can I customize the first person controller? I would like to add a few things, for example to pick up something, and to crouch. Where can I modify the controls of the controller?
     
  2. zine92

    zine92

    Joined:
    Nov 13, 2010
    Posts:
    1,347
    You can't really customize the controller. It's more like you have to script your own behaviour and extend it onto the current fps controller.
     
  3. gregtom6

    gregtom6

    Joined:
    May 26, 2011
    Posts:
    56
    So I can't rewrite the script what's about the controls?
     
  4. zine92

    zine92

    Joined:
    Nov 13, 2010
    Posts:
    1,347
    You can customize the already given controls. Look in the scripts and i think they use Input.GetAxis(); And if so, you can just go into the input manager(Edit > project setting > input) and change the keys. If you want more function like crouching/sniping/proning/running. You need to make new scripts for those behavior.
     
  5. gregtom6

    gregtom6

    Joined:
    May 26, 2011
    Posts:
    56
    But I don't know how to make a new script for these behavior.

    edit: What is the name of the function which starts after one of the key is pressed?

    edit2: In here: http://forum.unity3d.com/threads/20830-Crouching-for-the-FPS-controller
    The user mentioned that he left out all the other code that remains in the original script since he didn't change it.
    So what is the name of that original script, and where can I find that?
     
    Last edited: Aug 8, 2011
  6. zine92

    zine92

    Joined:
    Nov 13, 2010
    Posts:
    1,347
    I am guessing the fps walker script is the one that is included with the character controller package. I guess if you are new to scripting, you should go do up some tutorial before even attempting this. That would be easier once you grasp the concept of Unity.
     
  7. gregtom6

    gregtom6

    Joined:
    May 26, 2011
    Posts:
    56
    I have already wrote a few scripts before I start this topic(they were trigger scripts), but I search for the mentioned script file, and I can't find that.
    There's 3 script file with the character controller, and any of those have information about the pressed buttons.

    But I don't know how to write a script what starts to run with starts of the game. I think I need to use a pre-defined method, like OnTriggerEnter(), but I can't find that name.


    edit: I figured out what was the problem. Thanks. Didn't need any help for figuring this out :)
     
    Last edited: Aug 8, 2011
  8. NateLaw1988

    NateLaw1988

    Joined:
    Nov 17, 2016
    Posts:
    2
    Hi I know this is an old post but incase someone new comes along like I did I have posted a video with a project download link to a heavily extended first person controller