Skip to content

Commit d44e5c1

Browse files
Change GGVPointer to use registered raycast provider (#11147)
Co-authored-by: Keith Phillips <keith.phillips@au.saabgroup.com>
1 parent 3e27d19 commit d44e5c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Assets/MRTK/SDK/Features/UX/Scripts/Pointers/GGVPointer.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ public bool OnSceneQuery(LayerMask[] prioritizedLayerMasks, bool focusIndividual
196196
}
197197
else
198198
{
199-
bool didHit = MixedRealityRaycaster.RaycastSimplePhysicsStep(Rays[0], Rays[0].Length, prioritizedLayerMasks, focusIndividualCompoundCollider, out RaycastHit physicsHit);
200-
hitInfo = new MixedRealityRaycastHit(didHit, physicsHit);
199+
var raycastProvider = CoreServices.InputSystem.RaycastProvider;
200+
bool didHit = raycastProvider.Raycast(Rays[0], prioritizedLayerMasks, focusIndividualCompoundCollider, out hitInfo);
201201
Ray = Rays[0];
202202
rayStepIndex = 0;
203203
return didHit;
@@ -212,7 +212,8 @@ public bool OnSceneQuery(LayerMask[] prioritizedLayerMasks, bool focusIndividual
212212
}
213213
else
214214
{
215-
bool didHit = MixedRealityRaycaster.RaycastSimplePhysicsStep(Rays[0], Rays[0].Length, prioritizedLayerMasks, focusIndividualCompoundCollider, out RaycastHit physicsHit);
215+
var raycastProvider = CoreServices.InputSystem.RaycastProvider;
216+
bool didHit = raycastProvider.Raycast(Rays[0], prioritizedLayerMasks, focusIndividualCompoundCollider, out MixedRealityRaycastHit physicsHit);
216217
if (didHit)
217218
{
218219
hitObject = physicsHit.collider.gameObject;

0 commit comments

Comments
 (0)