Player animations slow down on listen server

I checked if there is such problem in other projects. It turned out that these lags are in any 5.2 project. I checked even on other PCs and the problem is exactly the same. On 5.0 animations are not slowed down, but still jittery.

What I did: I found information that I need to do two things. 1. bOnlyAllowAutonomousTickPose=false in Character class (PossessedBy)
2. Override and comment TickCharacterPose() in CharacterMovementComponent (MoveAutonomous)

But I ran into a c++ related problem in second task. I don’t understand how this function can be overridden, because when I just wanted to copy the function code from the CharacterMovementComponent to my child component, the namespace member is not defined for me: CharacterMovementCVars::EnableQueuedAnimEventsOnServer. (before that, I managed to overwrite it and in general there are no problems, I replaced my component from the standard one)

This happens because CharacterMovementComponent.h has only two external members.
image

Whereas the required namespace member is in CharacterMovementComponent.cpp .

And if i directly include “Engine/Private/Components/CharacterMovementComponent.cpp” in my component.cpp i get an errors:
a) ‘PerfCountersModule.h’: No such file or directory(fixed)
b)Cannot open include file: ‘CharacterMovementComponent.gen.cpp’: No such file or directory

So what can I do to fix this? And as I understand Super will not help here, because I need to disable (comment) the TickCharacterPose call (not just change the variable).

1 Like