So far I’ve got this
UFUNCTION()
void SetupGravity();
UFUNCTION(Reliable, Server, WithValidation)
void SetPlayerGravity();
void SetPlayerGravity_Implementation();
bool SetPlayerGravity_Validate();
then implemented like so…
//This is called when I press the letter "e"
void AKoreChar::SetupGravity()
SetPlayerGravity();
void AKoreChar::SetPlayerGravity_Implementation()
{
custMoveComp->GravityScale = 1;
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Blue, FString::Printf(TEXT("Gravity = %s"), *FString::SanitizeFloat(custMoveComp->GravityScale)));
}
bool AKoreChar::SetPlayerGravity_Validate()
return true;
This will make the character on the server start to fall. But the clients do not. Even though the On screen debug message which reads the gravity scale of each character shows 1.0f as the value (which means they should fall)