UOculusFunctionLibrary::GetPose

Grabs the current orientation and position for the HMD.

Choose your operating system:

Windows

macOS

Linux

References

Module

OculusHMD

Header

/Engine/Plugins/Runtime/Oculus/OculusVR/Source/OculusHMD/Public/OculusFunctionLibrary.h

Include

#include "OculusFunctionLibrary.h"

Source

/Engine/Plugins/Runtime/Oculus/OculusVR/Source/OculusHMD/Private/OculusFunctionLibrary.cpp

Syntax

UFUNCTION(BlueprintPure, Category="OculusLibrary")
static void GetPose
(
    FRotator & DeviceRotation,
    FVector & DevicePosition,
    FVector & NeckPosition,
    bool bUseOrienationForPlayerCamera,
    bool bUsePositionForPlayerCamera,
    const FVector PositionScale
)

Remarks

Grabs the current orientation and position for the HMD. If positional tracking is not available, DevicePosition will be a zero vector

Parameters

Parameter

Description

DeviceRotation

(out) The device's current rotation

DevicePosition

(out) The device's current position, in its own tracking space

NeckPosition

(out) The estimated neck position, calculated using NeckToEye vector from User Profile. Same coordinate space as DevicePosition.

bUseOrienationForPlayerCamera

(in) Should be set to 'true' if the orientation is going to be used to update orientation of the camera manually.

bUsePositionForPlayerCamera

(in) Should be set to 'true' if the position is going to be used to update position of the camera manually.

PositionScale

(in) The 3D scale that will be applied to position.