Function ovr_sys::ovr_RecenterTrackingOrigin
[−]
[src]
pub unsafe extern "C" fn ovr_RecenterTrackingOrigin(
session: ovrSession
) -> ovrResult
Re-centers the sensor position and orientation.
This resets the (x,y,z) positional components and the yaw orientation component of the
tracking space for the HMD and controllers using the HMD's current tracking pose.
If the caller requires some tweaks on top of the HMD's current tracking pose, consider using
ovr_SpecifyTrackingOrigin instead.
The Roll and pitch orientation components are always determined by gravity and cannot
be redefined. All future tracking will report values relative to this new reference position.
If you are using ovrTrackerPoses then you will need to call ovr_GetTrackerPose after
this, because the sensor position(s) will change as a result of this.
The headset cannot be facing vertically upward or downward but rather must be roughly
level otherwise this function will fail with ovrError_InvalidHeadsetOrientation.
For more info, see the notes on each ovrTrackingOrigin enumeration to understand how
recenter will vary slightly in its behavior based on the current ovrTrackingOrigin setting.
session Specifies an ovrSession previously returned by ovr_Create.
Returns an ovrResult indicating success or failure. In the case of failure, use
ovr_GetLastErrorInfo to get more information. Return values include but aren't limited to:
* ovrSuccess: Completed successfully.
* ovrError_InvalidHeadsetOrientation: The headset was facing an invalid direction when
attempting recentering, such as facing vertically.
see ovrTrackingOrigin, ovr_GetTrackerPose, ovr_SpecifyTrackingOrigin