I’m trying to replicate the transform of an actor that was placed on the client, and from what I understand, a Server function should be callable from a client but it will only execute on the server (?).
The following functions are not being triggered when called from a client.
Is a Server function really callable from a client? If not, how would I go about replicating a client’s transform to the server?
.h
UFUNCTION(Server, Reliable, WithValidation, BlueprintCallable)
void ForceUpdateTransform(FTransform trans);
UFUNCTION(Server, Reliable, WithValidation, BlueprintCallable)
void ForceRelativeLocation(FVector loc);
.cpp
bool ATownStructure::ForceUpdateTransform_Validate(FTransform trans)
{
return true;
}
void ATownStructure::ForceUpdateTransform_Implementation(FTransform trans)
{
this->SetActorTransform(trans);
}
bool ATownStructure::ForceRelativeLocation_Validate(FVector loc)
{
return true;
}
void ATownStructure::ForceRelativeLocation_Implementation(FVector loc)
{
SetActorRelativeLocation(loc);
}