Anim blueprint variable/ anim state not replicating well

Hi! I’m having a problem replicating a bool variable that switches the state from the anim graph from idle to movement.

Everything works fine on standalone, server to client but client to server and client to client doesn’t work.

Here is my code


setting Anim Blueprint in AnimBP


Use of Var in StateMachine (going back to idle is just "can idle " bool to true


Idle RepNotify in CharacterBlueprint


Additional Replication Logic


Setting idle to false on walking


Setting idle to true on begin play because if it’s not set like that the Aim offset behaves weirdly

Showcase in multiplayer
2024-07-04 00-23-24.mkv (12.6 MB)

As you can see, the idle state is changing well on client, server, server to client but not on client to server or client to client. Movement does work fine when not using idle.

The reason i want to have an idle state is because i want to use a “random sequence” list to have variety on idles

I tried everything and can’t seem to find the cause of this problem. character movement and trajectory for motion matching are also replicated

You don’t need to replicate that.

See the default third person template for how they read whether a character is moving or not. All you need to do is read the velocity of the character, this is already updated on server and all clients, so if it’s greater than 0 then you can set your bool in the animation blueprint to true.

So basically, you can do everything you want here without any RPCs, RepNotifies, or Replicated variables.

1 Like

Worked, thanks!

1 Like