Anim Montage Replication for Melee Weapon Position?

I am currently using Unreal Engine 4.13 for my game built on the Generic Shooter Base, and using the Melee Tracing Plugin to create a Melee Attack. How I have coded it is as follows:

  1. Player Hits the Melee Attack Button.
  2. Checks for Authority, if not, calls the Custom Server Melee Event
  3. The Custom Server Melee Event then Calls a Melee Cast Event
  4. Melee Cast Event Holsters equipped Weapon,and draws the melee weapon,
  5. Swing Start is Declared → Anim Montage is Played ->Swing Ends.

alt text

And initially everything worked great. The server could see the attack, and all the clients can see the anim and register the attack, Everything appeared fine until sometimes attacks from Client to Client would register the hit, play the impact effects and all, but would deal no damage. It turns out they only dealt the damage if the Player who was the server had them physically on screen. If the server player turned away the attacks worked but wouldn’t register damage.

Then I noticed once ever 10 or so trys the client would work with the server pointed away.

To I put in says that would display what bone was hit. I noticed the server was not registering the hits. Below you can see two images. One of when the server actually registered the hit and one when it did not:

Well after hours of testing and trying new things I think that I have found the issue, but not the solution. From what I can tell is the Animation Montage is replicating and playing correctly, but only when on screen. The occasional time the melee attack works when not on screen to the server its when the character would have caused a hit without the animation.

I tested this by changing the code not the play the animation montage and just sit in a static position and I would wiggle the character till it caused a hit. This caused damage every single time confirming to me the bone position of the hand with the weapon is not being properly replicated when not on screen.

So my question is there a better way in blueprint to replicate actor position whether on screen or not? Like I said visually it works great and fine, but when not on screen it doesn’t, and I cannot have the server screen everywhere. Not to mention there is no server screen when playing on a dedicated server.

I have been doing research on this but I have not been able to find anything like it. I am sure it is a simple solution. Anyhow if I find one I will share as I always try to for others. I am open to suggestions or Ideas.

Under your Skeletal mesh in your character, under the skeletal mesh section there is a setting called “Mesh Component Update Flag”. The default is “Always Tick Pose”. Try changing it to “Always Tick Pose and Refresh Bones.” If this doesn’t work, then you need to look into network relevancy

That was it, thank you very much!

This thread and answer has stopped a downward spiral of doubt in my code, thank you very much! :slight_smile:

My Goodness… I was pulling my hair out. You saved 70% of my beautiful hair @Dartanlla. Thank you so much… Good thing it was not on my head.