Hi,
So I started from the third person template and the jumping is working correctly in multiplayer without doing anything, but I would like to execute the jump only on the server (Tell me if I should not do that, but from what I understand everything should be done on the server)
So I did this :
void AMyProjectCharacter::OnStartJump()
{
if(Role < ROLE_Authority)
{
ServerOnStartJump();
}
else
{
Jump();
}
}
void AMyProjectCharacter::OnStopJump()
{
if(Role < ROLE_Authority)
{
ServerOnStopJump();
}
else
{
StopJumping();
}
}
void AMyProjectCharacter::ServerOnStartJump_Implementation()
{
OnStartJump();
}
bool AMyProjectCharacter::ServerOnStartJump_Validate()
{
return true;
}
void AMyProjectCharacter::ServerOnStopJump_Implementation()
{
OnStopJump();
}
bool AMyProjectCharacter::ServerOnStopJump_Validate()
{
return true;
}
The result is that now the Jump is working correctly on the server but on the client I can’t jump anymore any ideas why ?