The last function is an optional visual aid used primarily for debugging. Gizmos are very useful for visualizing vector information. In this case, we are using a red GizmoDrawLine to illustrate the direction of the hit ray:
- Save the script and return to Unity.