Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Most performant FPS character controller?

Discussion in 'Assets and Asset Store' started by Kobix, Mar 5, 2023.

  1. Kobix

    Kobix

    Joined:
    Jan 23, 2014
    Posts:
    130
    Hello!

    I am writing here, because I am wondering, what is the most performant FPS controller you tried so far?

    I am specifically looking for something, that is jobified/bursted, if possible, because it seems most controllers just bomb main unity thread.

    And no, no ECS please, we already have most of project written in MonoBehaviors
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,013
    FPS Controller as in: input processing, changing the player‘s and camera’s transforms? What do you expect to be jobified and bursted in that process?

    You can use any controller, it will be among the things that contribute the least to the game‘s performance.
     
  3. Kobix

    Kobix

    Joined:
    Jan 23, 2014
    Posts:
    130
    Hmm, maybe I shouldn't emphasise "FPS" part too much, I meant character controller.

    And character controller deals with physics movement, which is loads of capsule casts / sphere casts / raycasts, and when you have 100 of those it tends to slow down main thread considerably.
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,013
    Okay if you mean a character controller for all moving characters where there can be hundreds of them, sure then it may become a concern. But even so, if these raycasts do show up in the profiler as having a significant CPU impact even among everything else going on, you could always try to jobify those raycasts. That shouldn't be too hard for any character controller that comes with source code.

    You did profile? Sometimes, it can even be a trivial line (quite often it's redundancy) that slows everything down once you scale it up, so be sure to analyze whatever controller you have right now before trying to replace it with another that will behave differently (or not even work within your setup) and requires not just integration effort but possibly also a lot of time re-balancing everything, tweaking values to make it look and feel like before, and so on.

    You may be better off optimizing the one you already use, it certainly cannot hurt trying to do that if you haven't already.
     
  5. Kobix

    Kobix

    Joined:
    Jan 23, 2014
    Posts:
    130
    Yes, it seems that doing it myself might be best bet after all. But I wouldn't call it easy task, since C#/Unity/Physics code is all mixed up so it may require lots of separate jobs; thats why I asked just in case something similar was made.

    Thanks for reply.