GvrVRHelpers
Helper functions common to GVR VR applications.
Summary
| Public static functions | |
|---|---|
| GetHeadForward() | Vector3Gets the forward vector relative to the headset's rotation.  | 
| GetHeadPosition() | Vector3Gets the head's position.  | 
| GetHeadRotation() | QuaternionGets the headset's rotation.  | 
| GetRayIntersection(GvrBasePointer.RaycastMode mode) | floatGets the distance at which the  DirectandCameraraycasts intersect. | 
| GetRecommendedMaxLaserDistance(GvrBasePointer.RaycastMode mode) | floatGets the recommended max laser distance, based on raycast mode.  | 
| GetShrinkLaser(GvrBasePointer.RaycastMode mode) | boolReturns a value indicating whether the laser is visually shrunken.  | 
| GetViewportCenter() | Vector2Gets the center of the screen or eye texture, in pixels.  | 
Public static functions
GetHeadForward
Vector3 GetHeadForward()
Gets the forward vector relative to the headset's rotation.
| Details | |
|---|---|
| Returns | The forward vector relative to the headset's rotation. | 
GetHeadPosition
Vector3 GetHeadPosition()
Gets the head's position.
| Details | |
|---|---|
| Returns | The head's position. | 
GetHeadRotation
Quaternion GetHeadRotation()
Gets the headset's rotation.
| Details | |
|---|---|
| Returns | The headset's rotation. | 
GetRayIntersection
float GetRayIntersection( GvrBasePointer.RaycastMode mode )
Gets the distance at which the Direct and Camera raycasts intersect. 
This is the point at which Hybrid mode will transition from Direct (closer than the intersection) to Camera (further than the intersection) mode. 
| Details | |||
|---|---|---|---|
| Parameters | 
 | ||
| Returns | The distance at which the  DirectandCameraraycasts intersect. | 
GetRecommendedMaxLaserDistance
float GetRecommendedMaxLaserDistance( GvrBasePointer.RaycastMode mode )
Gets the recommended max laser distance, based on raycast mode.
| Details | |||
|---|---|---|---|
| Parameters | 
 | ||
| Returns | The recommended maximum laser distance for the given mode. | 
GetShrinkLaser
bool GetShrinkLaser( GvrBasePointer.RaycastMode mode )
Returns a value indicating whether the laser is visually shrunken.
| Details | |||
|---|---|---|---|
| Parameters | 
 | ||
| Returns | Returns  trueif the laser is shrunken,falsea otherwise. | 
GetViewportCenter
Vector2 GetViewportCenter()
Gets the center of the screen or eye texture, in pixels.
| Details | |
|---|---|
| Returns | The center of the screen, in pixels. |