The Shoot () function, defined in the previous code block, runs for any frame where the Fire1 button has been pressed. The functions purpose is to simulate the Player shooting a weapon at a zombie. Instead of a projectile, we are instantiating a graphic Raycaster.
In the script you will notice that a ray called hit is created. This ray will be used to determine the trajectory of an imaginary bullet when the Fire1 button is released. The ray is drawn in the forward direction starting from the OVRCameraRig's current position. If the ray intersects with a collider attached to a zombie prefab, then a hit is recorded and the zombie dies.