Forum rules - please read before posting.

How to infuse AC into a custom FPS controller?

Hello. I'm planning to try to incorporate AC into a custom third-party FPS controller. I've studied the downloadable FPS controller for AC but I can't seem to get my head around it. Would it be possible to explain the high-level strategy I should use to have AC work with my own custom FPS controller.

Comments

  • In the simplest form, having AC work with a custom controller is essentially just a case of attaching AC's Player component to it, and setting its Motion control field to Manual. That'll prevent AC from interfering with position/rotation etc, allowing the custom controller to take over.

    When dealing with a FPS controller, however, you'll also need to use a custom camera. AC includes a First Person Camera component for its own controller, but you'll want to remove this and instead attach the Basic camera component to your controller's Camera child.

    This is necessary for your camera to be available in e.g. Camera: Switch Actions, and the Scene Manager's Default camer field. For more on this, see the Manual's "Custom cameras" chapter.

    From there, it's a case of integrating the two together so that AC and your controller can communicate. For example, preventing regular controller input when AC is in a cutscene. This area can vary in terms of complexity depending on your needs - you could, for example, have AC switch over to "Automatic" motion control during cutscenes so that e.g. Character: Move to point Actions affect the Player.

    It's a broad topic, and there's no "one size fits all" approach. However, have a look through the Manual's "Custom motion controllers" chapter, as well as this tutorial. I can elaborate on any of the above, but they should give you a good starting-off point to take things further from.

  • Thanks Chris, that's a great starting point. It seems hopeful to achieve, I will work on it and see how it goes. Thanks again.

  • Chris, a quick question related to this: For the custom FPS controller I'm building, I would be interested in using the new Unity "Input System". I suppose that the new Input System cannot co-exist with Unity's older Input Manager in the same game. Is there a way I could have AC use the new Input System or does that require a massive overhaul under the hood?

  • Nevermind, I found another thread that went into it along with a demo script from you. Sorry, I should really do a search on the forums before asking these questions :) Thank you.

  • I don't know how old that thread is, but an integration package for Input System can be found on the Downloads page.

  • Got it, thank you Chris!

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.