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 |
---|---|---|
EventSystem | eventSystem | |
PointerEventData | pointerEventData | |
LayerMask[] | layerMasks |
Returns
Type | Description |
---|---|
RaycastResult | The RaycastResult of the raycast. |
Raycast(RayStep, LayerMask[], Boolean, out MixedRealityRaycastHit)
Performs a raycast using the specified RayStep.
Declaration
bool Raycast(RayStep step, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
Parameters
Type | Name | Description |
---|---|---|
RayStep | step | |
LayerMask[] | prioritizedLayerMasks | |
Boolean | focusIndividualCompoundCollider | |
MixedRealityRaycastHit | 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 RayStep and radius.
Declaration
bool SphereCast(RayStep step, float radius, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
Parameters
Type | Name | Description |
---|---|---|
RayStep | step | |
Single | radius | |
LayerMask[] | prioritizedLayerMasks | |
Boolean | focusIndividualCompoundCollider | |
MixedRealityRaycastHit | hitInfo |
Returns
Type | Description |
---|---|
Boolean | Whether or not the SphereCast hit something. |