SceneCapture2D, tick worth of delay when using HMD?

I did some search in the source code, to find what bLockToHmd does, and I think I managed to find the solution.

Firstly we must update the position and rotation of the camera before rendering from the SceneCapture2D.

The update should be something similiar to what bLockToHMD does.

TObjectPtr<UCameraComponent> CameraComponent = GetCameraComponent();
IXRTrackingSystem* XRSystem = GEngine->XRSystem.Get();
auto XRCamera = XRSystem->GetXRCamera();
if (XRCamera->UpdatePlayerCamera(Orientation, Position))
{
	CameraComponent->SetRelativeTransform(FTransform(Orientation, Position));
}

I’m doing this in the TickActor from the Player (Pawn),
So my TickActor looks something like this:

void APlayer::TickActor(float DeltaTime, ELevelTick TickType, FActorTickFunction& ThisTickFunction)
{
	Super::TickActor(DeltaTime, TickType, ThisTickFunction);
	UpdateWithHMD();
	PerformRender();
	
}