This website uses cookies to improve our services and deliver relevant ads.
By interacting with this site, you agree to this use. For more information, see our Cookies Policy

Unity 1.26 Reference Guide

OVRRaycaster Class Reference

Extension of GraphicRaycaster to support ray casting with world space rays instead of just screen-space pointer positions
GraphicRaycaster inherited by OVRRaycaster.
IPointerEnterHandler inherited by OVRRaycaster.

Data Fields

GameObject
pointer ( )
int

Private Data Fields

Canvas
List< RaycastHit >
For the given ray, find graphics on this canvas which it intersects and are not blocked by other world objects

Properties

Canvas
canvas ( ) [Get]
override Camera
eventCamera ( ) [Get]
override int

Private Static Fields

static readonly List< RaycastHit >
Perform a raycast into the screen and collect all graphics underneath it.

Object Data

Private Member Functions

void
Raycast ( PointerEventData eventData, List< RaycastResult > resultAppendList, Ray ray, bool checkForBlocking )
void
GraphicRaycast ( Canvas canvas, Ray ray, List< RaycastHit > results )

Public Member Functions

override void
Raycast ( PointerEventData eventData, List< RaycastResult > resultAppendList )
Performs a raycast using eventData.worldSpaceRay
void
RaycastPointer ( PointerEventData eventData, List< RaycastResult > resultAppendList )
Performs a raycast using the pointer object attached to this OVRRaycaster
Vector2
GetScreenPosition ( RaycastResult raycastResult )
Get screen position of worldPosition contained in this RaycastResult
bool
Is this the currently focussed Raycaster according to the InputModule
void
OnPointerEnter ( PointerEventData e )

Object Data

static bool
RayIntersectsRectTransform ( RectTransform rectTransform, Ray ray, out Vector3 worldPos )
Detects whether a ray intersects a RectTransform and if it does also returns the world position of the intersection.

Field Documentation

GameObject OVRRaycaster.pointer ( )
int OVRRaycaster.sortOrder ( )

Object Data Documentation

Canvas OVRRaycaster.m_Canvas ( )
List<RaycastHit> OVRRaycaster.m_RaycastResults ( )
For the given ray, find graphics on this canvas which it intersects and are not blocked by other world objects

Property Documentation

Canvas OVRRaycaster.canvas ( )
override Camera OVRRaycaster.eventCamera ( )
override int OVRRaycaster.sortOrderPriority ( )

Private Static Field Documentation

readonly List<RaycastHit> OVRRaycaster.s_SortedGraphics ( )
Perform a raycast into the screen and collect all graphics underneath it.

Object Data Documentation

OVRRaycaster.OVRRaycaster ( )

Object Data Documentation

void OVRRaycaster.Raycast ( PointerEventData eventData, List< RaycastResult > resultAppendList, Ray ray, bool checkForBlocking )
void OVRRaycaster.GraphicRaycast ( Canvas canvas, Ray ray, List< RaycastHit > results )

Member Function Documentation

override void OVRRaycaster.Raycast ( PointerEventData eventData, List< RaycastResult > resultAppendList )
Performs a raycast using eventData.worldSpaceRay
Parameters
eventData resultAppendList
void OVRRaycaster.RaycastPointer ( PointerEventData eventData, List< RaycastResult > resultAppendList )
Performs a raycast using the pointer object attached to this OVRRaycaster
Parameters
eventData resultAppendList
Vector2 OVRRaycaster.GetScreenPosition ( RaycastResult raycastResult )
Get screen position of worldPosition contained in this RaycastResult
Parameters
worldPosition
bool OVRRaycaster.IsFocussed ( )
Is this the currently focussed Raycaster according to the InputModule
void OVRRaycaster.OnPointerEnter ( PointerEventData e )

Object Data Documentation

static bool OVRRaycaster.RayIntersectsRectTransform ( RectTransform rectTransform, Ray ray, out Vector3 worldPos )
Detects whether a ray intersects a RectTransform and if it does also returns the world position of the intersection.
Parameters
rectTransform ray worldPos
The documentation for this class was generated from the following file: Oculus/VR/Scripts/Util/OVRRaycaster.cs