All right, I could finally solve this puzzle.
Reason was that I have set the various settings that determine the camera component’s behavior only on the client, but not on the server where the character spawned.
Here are the settings:
VRReplicatedCamera->bUsePawnControlRotation = true;
VRReplicatedCamera->bAutoSetLockToHmd = false;
VRReplicatedCamera->bLockToHmd = false;
VRReplicatedCamera->bFPSDebugMode = true;
VRReplicatedCamera->bUpdateInCharacterMovement = false;
if (UVRCharacterMovementComponent* const cmc = Cast<UVRCharacterMovementComponent>(GetMovementComponent()))
{
cmc->bAllowMovementMerging = true;
cmc->bUseClientControlRotation = true;
cmc->bRunControlRotationInMovementComponent = true;
}
When I set these on both client and server (as they do not replicate) it works.
My takeaways are:
- It is possible to use desktop or vr with the same
UReplicatedVRCameraComponent
- Setting the control rotation via AddYawInput() on the client is okay