x

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"

Queued AnimNotifies skipped on Server

I am running an anim montage on server called by the client however at times the anim notifies on the server version of the character is skipped entirely! The anim notifies are custom made in C++

One workaround for this is to make the MontageTick Type as "Branching point" , however this is undesired.

An apparent pattern seems to be that anim notifies fail when the character is off screen (in other words not being actively rendered), So I changed the MeshComponentUpdateFlag of the character mesh to AlwaysTickPoseAndRefreshBones ,but that didn't change anything.

Product Version: UE 4.19
Tags:
more ▼

asked Mar 19 '18 at 11:18 PM in C++ Programming

avatar image

Commander Shepard
727 55 79 211

avatar image Alan Liu Apr 22 '18 at 11:47 AM

Same question.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

This looks related to UCharacterMovementComponent::ServerMoveDual_Implementation which calls UCharacterMovementComponent::ServerMove_Implementation twice. ServerMove_Implementation can call MoveAutonmous, which then calls PerformMovement, which can call TickCharacterPose. This call to tick the character pose can queue up animation notifies, which are not immediately dispatched. When the second ServerMove is called, the queue gets emptied, getting rid of the notifies from the previous ServerMove. If, however, the notify gets picked up in the second call to ServerMove, it can stay in the notify queue until the mesh component calls FinalizeAnimationUpdates later, where it is dispatched. So depending on where the notify gets processed, it may or may not be skipped.

At a glance, it looks possible that this may have been an issue in the past. After the call to PerformMovement, there's another place in MoveAutonomous where TickCharacterPose can be called, which has an immediate call after it to dispatch any queued animation events. This also has the comment "Trigger Events right away, as we could be receiving multiple ServerMoves per frame."

As a tentative fix, inside of UCharacterMovementComponent::TickCharacterPose, I've been looking at calling CharacterMesh->ConditionallyDispatchQueuedAnimEvents right after CharacterMesh->TickPose to eliminate this and possibly similar issues from occurring. It's totally possible that there is a better place to put this call, or that there is a reason why, for the previous case, they placed it outside of TickCharacterPose. But, it does seem to solve the issue.

more ▼

answered Oct 12 '18 at 04:13 PM

avatar image

rcarper-defiant
31 1 3 6

avatar image Ryujin Ishima Dec 29 '18 at 11:58 PM

Thank you very much for this information!

Since the TickCharacterPose() is not a virtual method, I couldn't override it to add the call to ConditionallyDispatchQueuedAnimEvents(). I ended up overriding ServerMoveDual_Implementation() and added a call to ConditionallyDispatchQueuedAnimEvents() after first ServerMove_Implementation() and everything seemed to work fine.

AnimNotifies being dropped on server seem more of a bug than a desired behavior. It would be great if Epic's Staff could respond and provide some sort of explanation to this

(comments are locked)
10|2000 characters needed characters left
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