Auto Focus

The Auto Focus module is a post processing effect that changes the depth of field based on where the camera is looking.

Unity's Post Processing Package must be installed for the Auto Focus module to work. A post processing profile and volume will be created automatically, so nothing needs to be done manually other than having the package installed.


📷 Settings

The following settings are available to customize:

  • Focus Mode: The type of focus mode to use

    • First Person: Focuses the camera on the object being looked at
    • Third Person: Focuses the camera on the tracked target object (usually the player/character)
  • Post Processing Layer: The Unity layer the post processing effect is applied to. It is usually recommended to have a dedicated layer for post processing.

  • Aperture: The ratio of aperture (known as f-stop or f-number). The smaller the value, the shallower the depth of field is.

  • Focal Length: The distance between the lens and the film. The larger the value, the shallower the depth of field is.

  • Focus Time: The amount of seconds it takes the camera to change focus distance.

  • Distance Range: The minimum and maximum focus distance.


🧰 Scripting API