The camera's orthographic size (zoom) should change when entering certain triggers for cinematic effect.
Accomplished basic functionality with a zoomtrigger prefab object, the attached script has serialized fields for zoom amount and time modified duration to make this easy to use in the unity editor.
When the player remains 'triggered' by the zoom GameObject the camera zoom lerps between the default zoom and the target zoom.
When the player steps away from the trigger, the camera reverts to its default zoom.
The camera's orthographic size (zoom) should change when entering certain triggers for cinematic effect. Accomplished basic functionality with a zoomtrigger prefab object, the attached script has serialized fields for zoom amount and time modified duration to make this easy to use in the unity editor.
When the player remains 'triggered' by the zoom GameObject the camera zoom lerps between the default zoom and the target zoom. When the player steps away from the trigger, the camera reverts to its default zoom.
https://github.com/Eggsbox-Game-Studios/Nursery-Crimes/commit/3484453f8c101a3388e208debd08e6d45225a005