Hello.
I’m trying to set up the replication of the input. On listen-server’s side all fine, but the client does not perceive the input and does not play the animation, but sees the character move from the server. I’ve set up a breakpoint on the server application and the client move function is triggered and gets the correct values during the keys pressed on the client, but the client character does not move.
"PlayerCharacter.h"
UFUNCTION( Server, Reliable, WithValidation )
void Server_MoveRight( float Value );
UFUNCTION( NetMulticast, Reliable )
void Client_MoveRight( float Value );
void MoveRight( float Value );
"PlayerCharacter.cpp"
void APlayerCharacter::MoveRight( float Value )
{
Server_MoveRight( Value );
}
void APlayerCharacter::Server_MoveRight_Implementation( float Value )
{
if ( HasAuthority() )
{
Client_MoveRight( Value );
}
}
bool APlayerCharacter::Server_MoveRight_Validate( float Value )
{
return true;
}
void APlayerCharacter::Client_MoveRight_Implementation( float Value )
{
AddMovementInput( FVector( 1.0f, 0.0f, 0.0f ), Value );
}
Help please.