Beispiel #1
0
void ACPP_VRPawn::ResetHMDOrigin()
{
	IHeadMountedDisplay* HMD = (IHeadMountedDisplay*)(GEngine->HMDDevice.Get());
	if (HMD && HMD->IsStereoEnabled())
	{
		HMD->ResetOrientationAndPosition();
	}
}
Beispiel #2
0
//VR setup functions
void ACPP_VRPawn::SetupVROptions()
{
	IHeadMountedDisplay* HMD = (IHeadMountedDisplay*)(GEngine->HMDDevice.Get());
	if (HMD && HMD->IsStereoEnabled())
	{
		HMD->EnablePositionalTracking(bPositionalHeadTracking);

		if (!bPositionalHeadTracking)
		{
			Camera->SetRelativeLocation(FVector(0, 0, 0));
		}
	}
}
Beispiel #3
0
void AVRCharacter::SetupVROptions()
{
	IHeadMountedDisplay* HMD = (IHeadMountedDisplay*)(GEngine->HMDDevice.Get());
	if (HMD && HMD->IsStereoEnabled())
	{
		/* Disable/Enable positional movement to pin camera translation */
		HMD->EnablePositionalTracking(bPositionalHeadTracking);

		/* Remove any translation when disabling positional head tracking */
		if (!bPositionalHeadTracking)
		{
			CameraComp->SetRelativeLocation(FVector(0, 0, 0));
		}
	}
}