Hi,
I’d like to know how to stop a component from replicating over the network. More specifically my camera spring arm and camera.
Here is a snippet in my MyCharacter.ccp:
this->CameraSpringArm->SetIsReplicated(false);
this->Camera->SetIsReplicated(false);
Here is a snippet in my class extending USpringArmComponent:
this->bReplicates = false;
this->SetIsReplicated(false);
(This second snippet is called both in the constructor and in a function called in the Character’s constructor)
Right so, with all of this code it should stop the component from replicating, right?
Well not so fast!
I added this code to my TickComponent:
if (GetAttachmentRootActor()->Role == ROLE_Authority) {
LOGWARN("Ticking from server");
}
else {
LOGWARN("Ticking from client");
}
And sure enough, when running the game in PIE with dedicated server ticked, what do I get? Both lines! God damit
Am I missing something here?