AimOffset and Turn in Place Animation Replication

Note: There’s probably better, more efficient ways of a achieving these results, but this method does work.

This tutorial (if I can call it that) should help you with making Aim Offset and Turn in Place animations replicate properly in a multiplayer environment.
I’m using Kubolds Rifle Animset Pro in this. You should be able to follow along with any of Kubolds animation packs.
The Animation Starter Pack does not have turn in place animations, though you may still get something out of this.

Short Version:
Here’s a short overview video that shows the end results along with all of the Blueprint script that makes it happen:
(if your fairly proficient in Blueprint then this is probably all you’ll need to reproduce what I’ve made):
goo.gl/wjHq14

Long Version:
In this video I start with a blank project, add the Rifle Animset Pro to it and begin going through the entire process from there:
goo.gl/5xyU3e

Blueprint Pastebin:
Player character blueprint: goo.gl/Aei1hT
Player animation blueprint: goo.gl/jfHLBN

Awesome! This is really useful W1930U7 :smiley:

Awesome timing, will need this sort of thing not too long from now. THANKS!

Thanks for sharing this code, very useful. Also works with the SwordAnimsetPro Turn animations.

Tip
The Delta Rotation pin can be changed with clicking the pin and picking separate pin option. Make sure to use the timer ratio remaining inside the AnimGraph. Getting better results with not adding a ratio timer to the leave play left or right animation, and using a 180 angle turn animation.

Thanks, and nice music choice :slight_smile:

I had no need for server replication, but I was struggling with a turn in place animation for my game…and this helped a tonne.

Thank you!

Similarly to the user above, I was using the Movement Animset Pro and it worked great.

Hi All, sorry to bump this… thanks for the tips and works ok this way, although the pitch is laggy/jittery when looking down the guns scope. Is there a way to smooth out the update? This problem keeps me up at night…

i have this lag to :frowning:

lol necro :smiley:
but that background music from gothic was worth it. the nostalgia stikes again.

Thanks for your tutorial. How can i get turn in place with WASD ? Can you share any example please?

A true gentleman right there

its driven off of mouse inputs for turn and lookup you can simply add for look up add w +1 and S -1 and for turn add D +1 and A -1. This should work :smiley:

Based on this solution I made a solution where the Delta Rotation is set locally instead of replicating it, since the movement is already replicated by the engine itself, seemed a bit waste of network bandwidth. If anyone is interested check it here:

So for each character the delta rotation (yaw delta in my BP) is set like so:

Anyone know if this still works good? I’ve been trying to use it but the animation always looks weird and fully turns then loops.

[video]https://i.gyazo.com/2b1dab4fdb617e0f3f2c423f698c2963.mp4[/video]

How is this set up insight the State Machine ? I was trying to do a simaler thing once I reached past the 90 degree aim offset.

I am still learning a lot about this stuff and I am curious about something. Why do you have input get axis for move forward in the blueprint if the characters movement component handles all that stuff already for replication?

I only ask because in my project i have a blueprint from the character third person project. Replicates fine with move forward and left and all that without anything at all in the blueprint.

Another question… Why is it that if i look for the characters rotation in the characters blueprint event graph i can replicate that value fine and pass on to the animation event graph to do things with… however… if instead i go to the animation event graph and look for the characters rotation there … and use its pitch as the pitch for the animations… it does not replicate… only performs it locally. Can you help me answer why?

Wouldn’t that mean your replicating the same thing twice in some instances?

Dont want to necro post here but you helped me a lot with your video. Thank you really much! Had to thank you for this.