Dear Epic,
How can I completely disable character movement replication so I can use my own movement replication system?
I developed a method that works great for me, including when there is packet loss, but I cannot figure out how to
-
disable character movement replication
-
still be able to a client controlled unit (server is free to move, but client always ends up unable to move freely, constantly having its position reset/adjusted by server.
#Context
I am using nettest.txt, run on both client and server during game time, to simulate network conditions
Net PktLoss=1
Net PktOrder=0
Net PktDup=0
Net PktLag=75
Net PktLagVariance=0
p.netshowcorrections 1
log lognetplayermovement verbose
#Issue
The client jitters / jumps positions with the above amount of packet loss.
I’ve experienced this in real multiplayer games, which have similar jumping/jittering/stuttering behavior to the artifical test using nettest.txt
I have my own custom movement replication code that I’d like to use, but I cannot figure out how to disable UE4’s standard character movement replication code.
The server is fine, but the client’s experience is always that the character becomes stuck / unable to move when I try to disable movement replication.
#My Goal
I am trying to completely remove standard UE4 character movement replication, so I can use my own method, but no matter what I try, the client’s controlled character will either be stuttering as usual or simply unable to move.
#What I’ve Tried
bReplicatesMovement, trued turning this off. The server stops replicating movement to client, but client controlled unit still stutters and jumps during packet loss!
Tried overriding and nullifying various movement replication functions in custom CharacterMovementComponent,
including
//virtual void SendClientAdjustment() override;
//virtual bool ClientUpdatePositionAfterServerUpdate() override;
//virtual void SmoothCorrection(const FVector& OldLocation) override;
//virtual void SmoothClientPosition(float DeltaTime) override;
//virtual void ForcePositionUpdate(float DeltaTime) override;
//virtual void CallServerMove(const class FSavedMove_Character* NewMove, const class FSavedMove_Character* OldMove) override;
//virtual void ServerMoveHandleClientError(float TimeStamp, float DeltaTime, const FVector& Accel, const FVector& ClientLoc, UPrimitiveComponent* ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) override;
This usually results in the client controlled character being unable to move at all!
#Conclusion
No matter what I do I can’t seem to “free” the client’s character from the influences of the character replication code that causes severe jitter when running nettest.txt
It’s a monumental task to re-write entire character class, I just want to disable character movement replication and still be able to move the client controlled character around freely!
#My Exact Question
How do I free the client’s controlled character to roam freely without influence of UE4 standard character movement replication?
Thanks!
Rama