For the tunneling, I went with the vignette effect from the post-processing stack (v.2). I put a
Post-process Layer component into the camera game object and created a
PostFX empty object with a
Post-process Volume component. Since the volume should affect the player's sight all the time, it should be set to global. By adding the vignette effect to the volume and changing its intensity, we can create the tunneling effect.
The intensity value should be based on the player's speed. So by dividing the current speed by the maximum speed, I am calculating the vignette intensity. This is done in the
BlindersVR.cs script. Add linear interpolation to it, and blinders are done!