/// <inheritdoc />
        public override void OnPreSceneQuery()
        {
            Debug.Assert(lineBase != null);

            lineBase.UpdateMatrix();

            // Set our first and last points
            if (IsFocusLocked && IsTargetPositionLockedOnFocusLock && Result != null)
            {
                // Make the final point 'stick' to the target at the distance of the target
                SetLinePoints(Position, Result.Details.Point, Result.Details.RayDistance);
            }
            else
            {
                SetLinePoints(Position, Position + Rotation * Vector3.forward * DefaultPointerExtent, DefaultPointerExtent);
            }

            // Make sure our array will hold
            if (Rays == null || Rays.Length != LineCastResolution)
            {
                Rays = new RayStep[LineCastResolution];
            }

            float   stepSize  = 1f / Rays.Length;
            Vector3 lastPoint = lineBase.GetUnClampedPoint(0f);

            for (int i = 0; i < Rays.Length; i++)
            {
                Vector3 currentPoint = lineBase.GetUnClampedPoint(stepSize * (i + 1));
                Rays[i].UpdateRayStep(ref lastPoint, ref currentPoint);
                lastPoint = currentPoint;
            }
        }
        protected virtual void PreUpdateLineRenderers()
        {
            Debug.Assert(lineBase != null);

            lineBase.UpdateMatrix();

            // Set our first and last points
            if (IsFocusLocked && IsTargetPositionLockedOnFocusLock && Result != null)
            {
                // Make the final point 'stick' to the target at the distance of the target
                SetLinePoints(Position, Result.Details.Point);
            }
            else
            {
                SetLinePoints(Position, Position + Rotation * Vector3.forward * DefaultPointerExtent);
            }
        }
        /// <inheritdoc />
        public override void OnPreRaycast()
        {
            Debug.Assert(lineBase != null);

            Vector3 pointerPosition;

            TryGetPointerPosition(out pointerPosition);

            lineBase.UpdateMatrix();

            // Set our first and last points
            lineBase.FirstPoint = pointerPosition;

            if (IsFocusLocked)
            {
                lineBase.LastPoint = pointerPosition + ((Result.Details.Point - pointerPosition).normalized * PointerExtent);
            }
            else
            {
                lineBase.LastPoint = pointerPosition + (PointerDirection * PointerExtent);
            }

            // Make sure our array will hold
            if (Rays == null || Rays.Length != LineCastResolution)
            {
                Rays = new RayStep[LineCastResolution];
            }

            // Set up our rays
            if (!IsFocusLocked)
            {
                // Turn off gravity so we get accurate rays
                gravityDistorter.enabled = false;
            }

            float   stepSize  = 1f / Rays.Length;
            Vector3 lastPoint = lineBase.GetUnClampedPoint(0f);

            for (int i = 0; i < Rays.Length; i++)
            {
                Vector3 currentPoint = lineBase.GetUnClampedPoint(stepSize * (i + 1));
                Rays[i].UpdateRayStep(ref lastPoint, ref currentPoint);
                lastPoint = currentPoint;
            }
        }