Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FPS Character Controller

Discussion in 'Scripting' started by Armando-Seketh, Apr 20, 2015.

  1. Armando-Seketh

    Armando-Seketh

    Joined:
    Nov 7, 2014
    Posts:
    3
    First of all, Good Evening, Morning or Night xD A friend and I are working on a Indie FPS game and need a bit of assistance, we are currently working on the Main Characters Controller, we want to get a bit of recomendations for example, what characteristics does the Character Controller need besides the slope offset, step offset and moving controls to get a more realistic movement?

    And also I'd like a little help getting a diagonal movement, currently we are using something like this to make the character move:

    if(Input.GetKey(keyForward)){
    moveTo = Vector3.forward;
    }

    It's and example and moveTo, keyForward are variables we are using.

    Note: The animations we have already finished most of them, we are working on some others to start moving the character with these animations.
     
  2. pws-devs

    pws-devs

    Joined:
    Feb 2, 2015
    Posts:
    63
    I am not sure as to how realistic you want your movement to be, so I won't comment on that.

    As for diagonal movement, just amend your "moveTo = Vector3.Forward" to "moveTo+=Vector3.Forward" instead, so that you do not assign the forward vector as the actual moveTo vector but just increment it.