Search Unity

Unity physics extremely limited for use cases(specifically FPS game)?

Discussion in 'Physics' started by ClosingTime, Jan 12, 2020.

  1. ClosingTime

    ClosingTime

    Joined:
    Nov 23, 2016
    Posts:
    241
    I want to make an FPS game where you can also jump and fall from a ledge.
    However, there doesn't seem to be an out of the box solution for that in Unity.
    There is a navmesh, and there are colliders and rigid bodies.

    Navmesh is really suitable for an FPS game, the issue is that Unity's navmesh is more suitable for AI for an RTS like game. It's not exactly good for a player in FPS format.

    I guess using colliders only might work, but that's a lot of artist work to set up the colliders for every level, instead of using the automatic navmesh generation.
    Also, there are always going to be issues with collisions that a nav mesh can properly solve.

    I am working on a solution where walking use a navmesh, and jumping use colliders against walls. But it seems like either the physics in Unity is not meant for FPS games out of the box, or I am missing something, or that every person who makes an FPS in Unity use an external library for FPS?
     
  2. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    the navmesh has this link thingy to make jump possible (don't remember what they are called)

    If that doesn't work for you, you can also turn off the NavMeshAgent and use some other solution to make a jump (putting it "on rails" or calculting the force needed for the jump and applying it to the rigidbody, etc.) and then turn the agent back on.

    also, I agree that the system suits RTS more then FPS, but that too is far from ideal, I tried that(making an RTS) a couple years ago and it required a lot of messing around to get a good behavior.