generic and platform specific devices
Classes
Enums
Values
DEVICE_TYPE_OCULUSGAME_TEMPLATE | ||
DEVICE_TYPE_PS4GAME_TEMPLATE | ||
VR_BRIGHTNESS_RISK_HIGHGAME_TEMPLATE | ||
VR_BRIGHTNESS_RISK_LOWGAME_TEMPLATE | ||
VR_BRIGHTNESS_RISK_MAXGAME_TEMPLATE | ||
VR_DIALOG_CANCELEDGAME_TEMPLATE | ||
VR_DIALOG_OKGAME_TEMPLATE | ||
VR_DIALOG_RUNNINGGAME_TEMPLATE | ||
VR_DIALOG_UNKNOWNGAME_TEMPLATE | ||
VR_EYE_LEFTGAME_TEMPLATE | HMD left eye. | |
VR_EYE_RIGHTGAME_TEMPLATE | ||
VR_HAND_LEFTGAME_TEMPLATE | HMD controller left hand. | |
VR_HAND_RIGHTGAME_TEMPLATE | ||
VR_RECENTER_ORIENTATIONGAME_TEMPLATE | ||
VR_RECENTER_POSITIONGAME_TEMPLATE | ||
VR_STATUS_CALIBRATINGGAME_TEMPLATE | The HMD is being calibrated. | |
VR_STATUS_DISPLAY_LOSTGAME_TEMPLATE | The HMD was present and disappeared. | |
VR_STATUS_MOUNTEDGAME_TEMPLATE | The HMD is mounted on users head. | |
VR_STATUS_PRESENTGAME_TEMPLATE | The HMD port is open. | |
VR_STATUS_SHOULD_QUITGAME_TEMPLATE | Application requested exit. | |
VR_STATUS_SHOULD_RECENTERGAME_TEMPLATE | The HMD Recenter request event was triggered. | |
VR_STATUS_TRACKEDGAME_TEMPLATE | The tracking data for the HMD are up to date. | |
VR_STATUS_UNKNOWNGAME_TEMPLATE | Unknown state, probably uninitialized. | |
VR_STATUS_VISIBLEGAME_TEMPLATE | The HMD is being used for rendering. | |
VR_TRACKING_QUALITY_FULLGAME_TEMPLATE | ||
VR_TRACKING_QUALITY_NONEGAME_TEMPLATE | ||
VR_TRACKING_QUALITY_NOT_VISIBLEGAME_TEMPLATE | ||
VR_TRACKING_QUALITY_PARTIALGAME_TEMPLATE |
Functions
proto native VRDeviceType GetDeviceType()GAME_TEMPLATE | returns device type. | more… |
proto external void GetEyeFOV(VREye eye, out float leftTan, out float rightTan, out float upTan, out float downTan)GAME_TEMPLATE | returns current FOV's tangent values. | more… |
proto native vector GetEyeOffset(VREye eye)GAME_TEMPLATE | Returns the eye offset in device space. | more… |
proto native vector GetEyeOrientation(VREye eye)GAME_TEMPLATE | returns HMD Eye's orientation. | more… |
proto native vector GetEyePosition(VREye eye)GAME_TEMPLATE | returns HMD Eye's position. | more… |
proto native vector GetHandOrientation(VRHand hand)GAME_TEMPLATE | returns HMD controller's orientation. | more… |
proto native vector GetHandPosition(VRHand hand)GAME_TEMPLATE | returns HMD controller's position. | more… |
proto native vector GetHeadOrientation()GAME_TEMPLATE | returns HMD head orientation. | more… |
proto native vector GetHeadPosition()GAME_TEMPLATE | returns HMD head position . | more… |
proto bool GetHmdTrackingStatus(out PSVrBrightnessRiskEnum bRisk, out PSVrTrackingQualityEnum posQuality, out PSVrTrackingQualityEnum orQuality)GAME_TEMPLATE | Returns HMD tracking status. | more… |
proto native static VRDevice GetInstance()GAME_TEMPLATE | returns VRDevice instance. | more… |
proto bool GetMoveTrackingStatus(VRHand hand, out PSVrBrightnessRiskEnum bRisk, out PSVrTrackingQualityEnum posQuality, out PSVrTrackingQualityEnum orQuality)GAME_TEMPLATE | Returns Move controller tracking status. | more… |
proto native owned string GetName()GAME_TEMPLATE | returns device name. | more… |
proto native PSVrHeadRecenterFlagsEnum GetRecenterHeadFlags()GAME_TEMPLATE | Returns HMD recentering flags. | more… |
proto native float GetScale()GAME_TEMPLATE | returns current vr scale. | more… |
proto native PSVrDialogStatusEnum GetServiceDialogStatus()GAME_TEMPLATE | Returns current service dialog state. | more… |
proto native PSVrDialogStatusEnum GetSetupDialogStatus()GAME_TEMPLATE | Returns current setup dialog state. | more… |
proto native VRStatus GetStatusFlags()GAME_TEMPLATE | returns status flags. | more… |
proto native void RecenterHeadTracking()GAME_TEMPLATE | Forces immediate head recenter. | more… |
proto native void ResetToDeviceFOV(VREye eye)GAME_TEMPLATE | Resets the FOV settings to device preset value. | |
proto native void Set2D(bool enabled)GAME_TEMPLATE | Switches VR device into 2D "theater" mode. | more… |
proto native void SetEyeFOV(VREye eye, float leftTan, float rightTan, float upTan, float downTan)GAME_TEMPLATE | Per eye FOV setup. | more… |
proto native void SetMinOutputColor(int color)GAME_TEMPLATE | Sets up the minimal displayable color. | more… |
proto native void SetOversamplingFactor(float factor)GAME_TEMPLATE | Sets up the render target size multiplier. | more… |
proto native void SetRecenterHeadFlags(PSVrHeadRecenterFlagsEnum flags)GAME_TEMPLATE | HMD recentering hint flags setup. | |
proto native void SetScale(float scale)GAME_TEMPLATE | Sets up current vr scale. | more… |
proto native bool ShowHmdServiceDialog()GAME_TEMPLATE | Pops up HMD service dialog. | more… |
proto native bool ShowHmdSetupDialog()GAME_TEMPLATE | Pops up HMD setup dialog. | more… |
Function Documentation
GetDeviceTypeVRDevice
proto native VRDeviceType GetDeviceType()GAME_TEMPLATEreturns device type.
Returns: device type enum.
GetEyeFOVVRDevice
proto external void GetEyeFOV(VREye eye, out float leftTan, out float rightTan, out float upTan, out float downTan)GAME_TEMPLATEreturns current FOV's tangent values.
In VR mode the FOV should be asymmetric.
Returns: tangent values of asymetric FOV.
GetEyeOffsetVRDevice_PS4
proto native vector GetEyeOffset(VREye eye)GAME_TEMPLATEReturns the eye offset in device space.
Returns: 3D position centered around device space center.
GetEyeOrientationVRDevice
proto native vector GetEyeOrientation(VREye eye)GAME_TEMPLATEreturns HMD Eye's orientation.
eye- left/right eye enum.
Returns: Euler angles in device space. (Yaw, Pitch, Roll)
GetEyePositionVRDevice
proto native vector GetEyePosition(VREye eye)GAME_TEMPLATEreturns HMD Eye's position.
eye- left/right eye enum.
Returns: position in world space.
GetHandOrientationVRDevice
proto native vector GetHandOrientation(VRHand hand)GAME_TEMPLATEreturns HMD controller's orientation.
hand- left/right hand enum.
Returns: Euler angles in device space. (Yaw, Pitch, Roll)
GetHandPositionVRDevice
proto native vector GetHandPosition(VRHand hand)GAME_TEMPLATEreturns HMD controller's position.
hand- left/right hand enum.
Returns: position in world space.
GetHeadOrientationVRDevice
proto native vector GetHeadOrientation()GAME_TEMPLATEreturns HMD head orientation.
Returns: Euler angles in device space. (Yaw, Pitch, Roll)
GetHeadPositionVRDevice
proto native vector GetHeadPosition()GAME_TEMPLATEreturns HMD head position .
Returns: position in world space.
GetHmdTrackingStatusVRDevice_PS4
proto bool GetHmdTrackingStatus(out PSVrBrightnessRiskEnum bRisk, out PSVrTrackingQualityEnum posQuality, out PSVrTrackingQualityEnum orQuality)GAME_TEMPLATEReturns HMD tracking status.
bRisk- tracked scene brightness risk.
posQuality- precision of the HMD position.
orQuality- precision of tthe HMD orientation.
Returns: false when the HMD port is not open.
GetInstanceVRDevice
proto native static VRDevice GetInstance()GAME_TEMPLATEreturns VRDevice instance.
Returns: device instance.
GetMoveTrackingStatusVRDevice_PS4
proto bool GetMoveTrackingStatus(VRHand hand, out PSVrBrightnessRiskEnum bRisk, out PSVrTrackingQualityEnum posQuality, out PSVrTrackingQualityEnum orQuality)GAME_TEMPLATEReturns Move controller tracking status.
hand- identifier of the contoller.
bRisk- tracked scene brightness risk.
posQuality- precision of the controllers position.
orQuality- precision of the controllers orientation.
Returns: false when the Move port is not open.
GetNameVRDevice
proto native owned string GetName()GAME_TEMPLATEreturns device name.
Returns: device brand name.
GetRecenterHeadFlagsVRDevice_PS4
proto native PSVrHeadRecenterFlagsEnum GetRecenterHeadFlags()GAME_TEMPLATEReturns HMD recentering flags.
Returns: recentering enum.
GetScaleVRDevice
proto native float GetScale()GAME_TEMPLATEreturns current vr scale.
Returns: the scale amount.
GetServiceDialogStatusVRDevice_PS4
proto native PSVrDialogStatusEnum GetServiceDialogStatus()GAME_TEMPLATEReturns current service dialog state.
Returns: dialog state enum.
GetSetupDialogStatusVRDevice_PS4
proto native PSVrDialogStatusEnum GetSetupDialogStatus()GAME_TEMPLATEReturns current setup dialog state.
Returns: dialog state enum.
GetStatusFlagsVRDevice
proto native VRStatus GetStatusFlags()GAME_TEMPLATEreturns status flags.
Returns: current device state flags.
RecenterHeadTrackingVRDevice
proto native void RecenterHeadTracking()GAME_TEMPLATEForces immediate head recenter.
Uses the current scene position and orientation as the new camera origin.
Set2DVRDevice_PS4
proto native void Set2D(bool enabled)GAME_TEMPLATESwitches VR device into 2D "theater" mode.
Don't forget to set appropriate FOV.
At the moment the device uses the render targets of the left eye. These render targets are 8:9 and we are still rendering both eyes. If the feature gets used in a actual gameplay we can extend it to separate set of 16:9 render targets.
enabled- enable/disable flag.
SetEyeFOVVRDevice_PS4
proto native void SetEyeFOV(VREye eye, float leftTan, float rightTan, float upTan, float downTan)GAME_TEMPLATEPer eye FOV setup.
Keep in mind that changing the values from device presets may cause user discomfort.
SetMinOutputColorVRDevice_PS4
proto native void SetMinOutputColor(int color)GAME_TEMPLATESets up the minimal displayable color.
Setup this value when smears start appearing in dark environments.
SetOversamplingFactorVRDevice_PS4
proto native void SetOversamplingFactor(float factor)GAME_TEMPLATESets up the render target size multiplier.
Set this value before the device gets initialized.
SetScaleVRDevice
proto native void SetScale(float scale)GAME_TEMPLATESets up current vr scale.
All translations will get scaled by this value. With higher scale values will the world around look smaller.
"Warning: The tracking errors will render more visible with high scale."
scale- the scale amount.
ShowHmdServiceDialogVRDevice_PS4
proto native bool ShowHmdServiceDialog()GAME_TEMPLATEPops up HMD service dialog.
Returns: true when dialog was opened and his state was resolved as OK.
ShowHmdSetupDialogVRDevice_PS4
proto native bool ShowHmdSetupDialog()GAME_TEMPLATEPops up HMD setup dialog.
Returns: true when dialog was opened and closed successfully.