Forum rules - please read before posting.

Custom FPS Controller?

Hello, can I use a custom FPS Controller with ac? IF not, how can I set Character Controller to zero gravity? I have 3 scence in space and need a floating fps character.

Comments

  • The Character Controller will rely on the Gravity values set in your Unity Physics settings, which can be reached from Edit -> Project settings -> Physics.

    Setting it to (0,0,0) won't be enough however, as AC will still only move the character along the ground.  I expect, however, that it would be possible to write a custom script that sits on top of a standard First Person AC Player, which reads the change in position each frame (in LateUpdate), and projects that vector in the direction that the camera is facing.

    Alternatively, AC can indeed work with custom FPS controllers, but it's not trivial:

    Player control can be left completely to a custom controller by setting the Player Inspector's Motion control field to Custom.

    Doing so will prevent AC from moving the character at all - which may be what you want - but in most cases you'll want AC and the custom controller to work together so that e.g. AC can control the player during cutscenes (or at least prevent movement) etc.

    To do this, an integration script is required to tell your game when AC can control the Player, and when the custom controller can.  Unfortuantely, since every custom controller is different, and the needs of every game is different, there's no "set way" to do this, but the Manual's "Custom motion controllers" chapter is the place to begin.

    For an example bridge script for an FPS controller, see the included UltimateFPSIntegration script, which allows AC to work with UFPS.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.