Why is the AimOffset not replicating?

I can’t seem to figure out why my AimOffset is not replicating.

Here is a clip of what’s going on:

Everything else in regards to the player animation is replicating without me needing to change anything.
So I’m not sure what’s different about AimOffsets.

Thanks.

Found the solution:
Instead of doing the math for pitch (which controls the AimOffset) in the Animation BP, I switched it all over to the character BP. Created a variable named pitch in the character BP, set it to replicate, and used a custom event to set the pitch on the server. In the Animation BP, I just use a cast to get pitch from the character BP and have it set another variable named pitch that’s used to control the AimOffset animation.

That probably didn’t make sense, but maybe it will help someone.

Ty, it works with anything regarding Animation Blueprints!

Thanks so much for posting this solution! Worked perfectly for me.

Worked great for me too and I was using an AnimBlendSpace not just a 1D BlendSpace,

Function works great with both Pitch and Yaw,

Is this all you would need to replicate aim offsets? I have your set up other than my characterbp sets the “Pitch” variable on the animbp because my cast’s fails, yet still my aim offset doesn’t replicate, do I need to do anything else?

If I understand you correctly, the answer to your question is yes. I got it working by having pitch set in the CharacterBP. So to copy what I’m doing here, you’ll need to figure out why your cast isn’t working.

I’ve refined this quite a bit since posting this question and made a tutorial.
See this forum post: AimOffset and Turn in Place Animation Replication - Character & Animation - Unreal Engine Forums

1 Like

Yeah got it working and I understand it alot better now, Thanks, I didn’t know that the Update Animation was called on the server too and the cast wasn’t working due to it being applied to a dodgy Character mesh, it’s been fixed now.

Thanks it works

this is fine if youre not looking down the scope - client asks server to update pitch and then server tells client to update, makes for very laggy movement which looks pretty bad. Id need to move aimoffset locally and then tell the server to try keep up

any1 know of a way to do this?

Yes, nice solution. And as stated, it works with both Pitch and Yaw. Thanks for that.

Thanks for the solution fixed my problem too

Hello guys … I have a similar problem, just move the mouse (Pitch) you create a strong lag in the movement and I can not understand the cause … Any of you solved the problem?

i solved this problem, works fine, without lags

Man you are awesome! Thank you soo much!

Thanks a lot! This answer the correct way to implement Aim Offset for multiplayer/networking.

organicFoil This is the smoothest replicated version I have seen, thanks so much!

Of course It’s smooth that’s because you’re doing it in the event tick which I strongly advice against it, your bandwidth will suffer from it, plus not all clients have the same frame rates.

Do NOT spam RPC calls on tick! You will totally destroy the games bandwidth in half a second, and the more players you have in a game the worse it will get. The server already has a replicated variable of the players pitch… Its in the player controller, just get that and update a replicated variable that other players then can retrieve to update animation states etc, with zero RPCs used.

On server in pawn bp: Get Control Rotation > Set “RotationVariable” (replicated)
and there you go!

1 Like

Hi Madhouse, yes RPC calls on tick are bad bad especially when infinite loop scenario occurs.

Im able to replicate a bone transform animation from my character blueprint and seems all good, IE Client sees bone and arrow rotating well but the spawn angle is always 0,0,0 - the projectile rotation spawn doesnt replicate from child arrow component attached to rotating bone. Im sure theres a checkbox im missing? Any Ideas? Thanks for your time…