/// <inheritdoc />
        public bool SphereCast(RayStep step, float radius, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
        {
            var result = MixedRealityRaycaster.RaycastSpherePhysicsStep(step, radius, step.Length, prioritizedLayerMasks, focusIndividualCompoundCollider, out RaycastHit physicsHit);

            hitInfo = new MixedRealityRaycastHit(result, physicsHit);
            return(result);
        }
        /// <inheritdoc />
        public bool Raycast(RayStep step, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
        {
            bool result = MixedRealityRaycaster.RaycastSimplePhysicsStep(step, step.Length, prioritizedLayerMasks, focusIndividualCompoundCollider, out RaycastHit physicsHit);

            hitInfo = new MixedRealityRaycastHit(result, physicsHit);
            return(result);
        }
        /// <inheritdoc />
        public bool SphereCast(RayStep step, float radius, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
        {
            Profiler.BeginSample("[MRTK] DefaultRaycastProvider.SphereCast");

            var result = MixedRealityRaycaster.RaycastSpherePhysicsStep(step, radius, step.Length, prioritizedLayerMasks, focusIndividualCompoundCollider, out RaycastHit physicsHit);

            hitInfo = new MixedRealityRaycastHit(result, physicsHit);

            Profiler.EndSample(); // SphereCast
            return(result);
        }
 /// <inheritdoc />
 public void UpdateGazeInfoFromHit(MixedRealityRaycastHit raycastHit)
 {
     HitInfo = raycastHit;
     if (raycastHit.transform != null)
     {
         GazeTarget = raycastHit.transform.gameObject;
         var ray = GazePointer.Rays[0];
         var lhd = (raycastHit.point - ray.Origin).magnitude;
         lastHitDistance = lhd;
         HitPosition     = ray.Origin + lhd * ray.Direction;
         HitNormal       = raycastHit.normal;
     }
     else
     {
         GazeTarget  = null;
         HitPosition = Vector3.zero;
         HitNormal   = Vector3.zero;
     }
 }