Replicating AActor properties

In the current project i’m working in i have to set bUseControllerRotationYaw replicate. my only issue is that i can’t set the property to replicate without editing the engine’s code. i tried to use DOREPLIFETIME to replicate the property but when i use this the entire game crashes on play. so how would i allow bUseControllerRotationYaw to replicate in the third person character class?

If you want to somehow change this in runtime, than the easiest way to do this without editing the engine source is something like that:

uint8 bMyUseControllerRotationYaw : 1;

void OnRep_MyUseControllerRotationYaw()

void AMyActor::OnRep_MyUseControllerRotationYaw()
    bUseControllerRotationYaw = bMyUseControllerRotationYaw;

And make some additional checks, to ensure both of them are in sync on a server side.

this does not work, the variable does not replicate

Have you added :

DOREPLIFETIME(AMyActor, bMyUseControllerRotationYaw);


void AMyActor::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const


yes, i have added it to the GetLifetimeReplicatedProps function but the other players don’t receive the property update. however, when i dont run a dedicated server the clients get the update from the server when the server changes bMyUseControllerRotationYaw but not vice versa

What is responsible for changing bMyUseControllerRotationYaw on the server side? Animation? Character movement? or what?