How is custom input with animations actually meant to work in multiplayer?

Imagine you’ve added some new animation-driving inputs that need to be replicated, i.e. booleans for sprinting, toggling run speeds, etc. You don’t want to clutter your character class up with each bool plus the ‘ServerBlahBlah’ Server-RPC functions in the header, and the ‘ServerBlahBlah_Validate’ and ‘ServerBlahBlah_Implementation’ functions in the .cpp.

Someone suggested I use a custom movement component and add my extra inputs in there and make sure they replicate, then animation graph can grab them. The problem is that there currently aren’t booleans for jumping, crouching, etc, in the base UCharacterMovementComponent. Why are they in the character class? It seems intentionally bloated and makes the character movement component less useful! Do I put my booleans in my custom movement component, and leave the pre-existing ones in the character, so it’s an unorganized mess?

I’m just trying to understand where my custom input + RPC to server + replication should go without cluttering up a huge character class.

Any ideas?

EDIT: My main point is that it feels like it’s set up for everything and nothing all at the same time - a half-baked pattern.

It kinda happens when you have a full-forward production going on. Unreal is being changed constantly, so it’s okay to be cluttered a little bit for now.

As for your question, I personally have everything inside my character. Yes, it may look cluttered but for me it’s better to support one cluttered class then two half-cluttered :slight_smile:

Do you use the built-in Jump and StopJump functions in the character? Trying to use the bIsJumping variable in the animation graph, but it constantly gets reset to false before the end of the tick.

I ask because the survival game series has a custom set of functions for some reason? It’s all rather confusing - should I not use the default Jump functionality?

I don’t have jumping functionality in my project, so I can’t tell you much on that subject unfortunately. Perhaps, Tom can give a better explanation of his choice.