Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 textalt 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:

alt text alt text

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.

Product Version: UE 4.13
melee1.jpg (249.0 kB)
melee3.jpg (433.0 kB)
melee4.jpg (292.2 kB)
melee1.jpg (249.0 kB)
more ▼

asked Feb 28 '17 at 01:21 AM in Blueprint Scripting

avatar image

38 3 4 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

more ▼

answered Feb 28 '17 at 02:11 AM

avatar image

2.6k 62 27 281

avatar image TK-Bear Feb 28 '17 at 02:55 AM

That was it, thank you very much!

avatar image Manspear Sep 02 '17 at 02:05 PM

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

avatar image Listerofsmeg Jun 25 '18 at 09:07 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question