Override/custom input system

gumboots

Member
Hi all!

I'm wondering if there's documentation anywhere for creating a custom input system for the UCC? I want to use Rewired, but I also want complete control of the input for repeating commands at a later stage, that type of thing.

Is this possible? The documentation only seems to list available tweaks. Is there a way to control the system externally so it doesn't do any input polling itself?

Thanks!
 
You can just create a custom implementation of PlayerInput and override the methods like GetButtonDown, GetAxisRaw, etc. to have full control over all of this. The demo scene just uses Unity's (old) input system, so that's where the actual input polling itself comes from. But you can override all of that with whatever input system, or even combination of systems, you want.
 
Hi Andrew, thanks for the reply!

So overriding that allows me to handle what is polled and how, but the system itself is still polling every Update (FixedUpdate?). I see the controller supports networking prediction, so maybe a better question is is there a guide to setting this up? As this would (usually) be done by applying a series of subsequent commands after a reset to the controller, rather than 1:1 ratio between frame and controller update. Meaning I could apply a handful of commands in a single frame if I needed to. Is this possible?
 
You can call UltimateCharacterLocomotion.Move multiple times to perform multiple movement commands. The Handler components are the ones that poll the input and with networking you can disable the handlers. From there isn't only the abilities that could get the input based on what input start types you are using.

Networking varies from implementation to implementation so there's not a guide on setting it all up. What a lot of people have done is grab the PUN add-on and look at that implementation to see how that works. The PUN integration implements all of the interfaces so provides a great example.
 
Top