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.
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
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
Thanks for sharing this code, very useful. Also works with the SwordAnimsetPro Turn animations.
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.
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…
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:
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?
At a guess… It allows for inverting the input, custom camera control, controlling / consuming input (consume movement input vector node). Basically for all the stuff that CMC replication doesn’t do, including custom animations / montages, manual root motion replication. Custom movements / replication for true First Person Camera setups etc.
At a guess, the CMC is located in the Character BP, not the Animation BP… But for more specifics you’d have to ask someone whose trawled through the C++ CMC code I suspect. Not me sry, just a mere mortal here…