BaseControllerPointer.OnSceneQuery Method

Definition

Overloads

OnSceneQuery(LayerMask[], Boolean, MixedRealityRaycastHit, RayStep, Int32)

Called to have the pointer query the scene to determine which objects it is hitting. Updates hitinfo. Used when the method for querying the scene utilizes a RaycastHit, such as when using UnityEngine.Physics.Raycast

OnSceneQuery(LayerMask[], Boolean, GameObject, Vector3, Single)

Called to have the pointer query the scene to determine which objects it is hitting. Updates hitObject, hitPoint, and hitDistance. Used when the method for querying the scene does not utilize a RaycastHit. Examples of this include UnityEngine.Physics.SphereOverlap, which performs no raycast calls

OnSceneQuery(LayerMask[], Boolean, MixedRealityRaycastHit, RayStep, Int32)

Called to have the pointer query the scene to determine which objects it is hitting. Updates hitinfo. Used when the method for querying the scene utilizes a RaycastHit, such as when using UnityEngine.Physics.Raycast

C++
public:
 virtual bool OnSceneQuery(cli::array <UnityEngine::LayerMask> ^ prioritizedLayerMasks, bool focusIndividualCompoundCollider, [Runtime::InteropServices::Out] Microsoft::MixedReality::Toolkit::Input::MixedRealityRaycastHit % hitInfo, [Runtime::InteropServices::Out] Microsoft::MixedReality::Toolkit::Physics::RayStep % Ray, [Runtime::InteropServices::Out] int % rayStepIndex);

Parameters

prioritizedLayerMasks
UnityEngine.LayerMask[]
focusIndividualCompoundCollider
Boolean
Ray
RayStep
rayStepIndex
Int32

Returns

Implements

Applies to

MRTK2 Unity 2019 2.8.0 och MRTK2 Unity 2020 2.8.0
Produkt Versioner
MRTK2 Unity 2019 2.8.0
MRTK2 Unity 2020 2.8.0

OnSceneQuery(LayerMask[], Boolean, GameObject, Vector3, Single)

Called to have the pointer query the scene to determine which objects it is hitting. Updates hitObject, hitPoint, and hitDistance. Used when the method for querying the scene does not utilize a RaycastHit. Examples of this include UnityEngine.Physics.SphereOverlap, which performs no raycast calls

C++
public:
 virtual bool OnSceneQuery(cli::array <UnityEngine::LayerMask> ^ prioritizedLayerMasks, bool focusIndividualCompoundCollider, [Runtime::InteropServices::Out] UnityEngine::GameObject ^ % hitObject, [Runtime::InteropServices::Out] UnityEngine::Vector3 % hitPoint, [Runtime::InteropServices::Out] float % hitDistance);

Parameters

prioritizedLayerMasks
UnityEngine.LayerMask[]
focusIndividualCompoundCollider
Boolean
hitObject
UnityEngine.GameObject
hitPoint
UnityEngine.Vector3
hitDistance
Single

Returns

Implements

Applies to

MRTK2 Unity 2019 2.8.0 och MRTK2 Unity 2020 2.8.0
Produkt Versioner
MRTK2 Unity 2019 2.8.0
MRTK2 Unity 2020 2.8.0