Clicking on Objects

I always forget the specifics of this script. This method uses the physics system to work, we need whatever we are clicking on to have a collider component. First we get a ray that starts at the cameras position and extends forward towards the mouse. We check if it hit anything, and do the raycast…

Follow Focus for PostProcessing DOF effect

The following script can be used with the post processing stack. Editing the script at runtime is kind of a pain. Attach the script to an object that has the PostProcessing layer, such as the same object you are using for a post processing volume. Calculate the distance as needed – I’m just getting the…