Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Rigidbody FPS Walker script - to test and use

Discussion in 'Scripting' started by ellvix, Mar 10, 2011.

  1. ellvix

    ellvix

    Joined:
    Nov 19, 2009
    Posts:
    16
    Hey all -

    Though this type of script gets posted all the time, I'd like to put another FPS rigidbody controller script out there for general use.

    I prefer rigidbody controllers to the standard controller, and had been using ye olde RigidbodyFPSWalker for quite a while; and though I liked it, I preferred the amount of control and specification I got with the FPS prefabs that shipped with 3.x. Sooo.... I modified the new CharacterMotor script for rigidbody control along the same lines as all the older rigidbody walker scripts. It works as a rigidbody walker, has all the decent fine tuning controls that come with CharacterMotor... and oh yeah, has multijump capability (I needed it for a project and thought I'd throw that in too).

    Thoughts? Opinions? Bug reports?
     

    Attached Files:

  2. Nyo

    Nyo

    Joined:
    Jan 25, 2011
    Posts:
    13
    Thanks! Always appreciated works like this.
     
  3. Nyo

    Nyo

    Joined:
    Jan 25, 2011
    Posts:
    13
    Do you have any updates like :
    //todo: add a func so rigidbody adjusts for upcoming stair / ramp

    I noticed that the player slides trying to stop after the input is not pressed anymore, is there a way to fix it?
    I applied your script to the RigidbodyFPSWalker project capsule.
     
  4. bacca87

    bacca87

    Joined:
    Jun 2, 2012
    Posts:
    1
    thx Ellvix,
    this is a very good script!!
    there are some updates on it? can we have the latest version?
     
  5. membersheep

    membersheep

    Joined:
    Jan 6, 2012
    Posts:
    1
    hi there, I'm reading it with bacca, this seems to work fine, it woul be good to see the lastest version so maybe we can work on it or add some features and share it again. ;)
     
  6. slkjdfv

    slkjdfv

    Joined:
    Oct 23, 2010
    Posts:
    435
    I'm trying to adapt this to work with a third person camera. How can I get it to where the character rotates towards the cameras facing direction and move in said direction. I tried Implementing some code from the built in 3rd person controller with no luck. Thanks :D
     
  7. Borzi

    Borzi

    Joined:
    Apr 13, 2013
    Posts:
    26
    Are you still working on improving this? I dunno if its just me but when I jump and collide to objects the player kinda sinks down instead of just falling straight to the ground...hope it helped!