This site has been archived and remains strictly as a historical reference for developers who actively maintain apps built using the legacy Google VR SDK, which was last updated in 2019 and is no longer receiving updates.
  • All developers actively developing experiences for Google Cardboard should use the new open source Cardboard SDKs for iOS, Android NDK, and Unity XR Plugin. These new SDKs offer streamlined APIs, improved device compatibility, and built-in viewer profile QR code scanning.
  • The Daydream View VR headset is no longer available for purchase as of October 15, 2019. Existing apps on supported devices are unaffected for users who previously installed those applications. It is no longer possible to opt-in to Daydream distribution via Google Play.

GvrBasePointerRaycaster

This is an abstract class.

This script provides shared functionality used by all Gvr raycasters.

Summary

Inheritance

Inherits from: BaseRaycaster
Direct Known Subclasses:GvrPointerGraphicRaycaster, GvrPointerPhysicsRaycaster

Properties

CurrentRaycastModeForHybrid
Gets the mode used for raycasting.

Protected functions

GvrBasePointerRaycaster()
Initializes a new instance of the GvrBasePointerRaycaster class.
PerformRaycast(GvrBasePointer.PointerRay pointerRay, float radius, PointerEventData eventData, List< RaycastResult > resultAppendList)
virtual abstract bool
Perform raycast on the scene.

Public functions

GetLastRay()
Gets the last ray created.
Raycast(PointerEventData eventData, List< RaycastResult > resultAppendList)
override void
Raycast against the scene.

Properties

CurrentRaycastModeForHybrid

GvrBasePointer.RaycastMode CurrentRaycastModeForHybrid

Gets the mode used for raycasting.

The mode used for raycasting.

Protected functions

GvrBasePointerRaycaster

 GvrBasePointerRaycaster()

Initializes a new instance of the GvrBasePointerRaycaster class.

PerformRaycast

virtual abstract bool PerformRaycast(
  GvrBasePointer.PointerRay pointerRay,
  float radius,
  PointerEventData eventData,
  List< RaycastResult > resultAppendList
)

Perform raycast on the scene.

Details
Parameters
pointerRay
The ray to use for the operation.
radius
The radius of the ray to use when testing for hits.
eventData
The event data triggered by any resultant Raycast hits.
resultAppendList
The results are appended to this list.
Returns
Returns true if the Raycast has at least one hit, false otherwise.

Public functions

GetLastRay

GvrBasePointer.PointerRay GetLastRay()

Gets the last ray created.

Details
Returns
The last ray created.

Raycast

override void Raycast(
  PointerEventData eventData,
  List< RaycastResult > resultAppendList
)

Raycast against the scene.

Details
Parameters
eventData
The pointer event data.
resultAppendList
The result of the raycast is appended to this list.