Interface IMixedRealityRaycastProvider
Interface to handle raycasts into the scene. Used by FocusProvider to perform ray and sphere cast queries for pointers.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public interface IMixedRealityRaycastProvider : IMixedRealityService, IDisposable
Remarks
Implementations of IMixedRealityRaycastProvider would likely use Unity's physics system to get hit results from Colliders. However, in a custom implementation, the raycast does not have to rely only on Unity-based Colliders to provide hit results, e.g. a GameObject may use a different mechanism for raycasting, and with a custom implementation, it could be included in the hit result.
Methods
GraphicsRaycast(EventSystem, PointerEventData, LayerMask[])
Performs a graphics raycast against the specified layerMasks.
Declaration
RaycastResult GraphicsRaycast(EventSystem eventSystem, PointerEventData pointerEventData, LayerMask[] layerMasks)
Parameters
Type | Name | Description |
---|---|---|
Event |
eventSystem | |
Pointer |
pointerEventData | |
Layer |
layerMasks |
Returns
Type | Description |
---|---|
Raycast |
The RaycastResult of the raycast. |
Raycast(RayStep, LayerMask[], Boolean, out MixedRealityRaycastHit)
Performs a raycast using the specified Ray
Declaration
bool Raycast(RayStep step, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
Parameters
Type | Name | Description |
---|---|---|
Ray |
step | |
Layer |
prioritizedLayerMasks | |
Boolean | focusIndividualCompoundCollider | |
Mixed |
hitInfo |
Returns
Type | Description |
---|---|
Boolean | Whether or not the raycast hit something. |
SphereCast(RayStep, Single, LayerMask[], Boolean, out MixedRealityRaycastHit)
Performs a sphere cast with the specified Ray
Declaration
bool SphereCast(RayStep step, float radius, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
Parameters
Type | Name | Description |
---|---|---|
Ray |
step | |
Single | radius | |
Layer |
prioritizedLayerMasks | |
Boolean | focusIndividualCompoundCollider | |
Mixed |
hitInfo |
Returns
Type | Description |
---|---|
Boolean | Whether or not the SphereCast hit something. |