Eggsbox-Game-Studios / Nursery-Crimes

GDP102 - GROUP ASSESSMENT
0 stars 0 forks source link

Camera Zoom Triggers #2

Open Gard-en opened 1 year ago

Gard-en commented 1 year ago

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

Gard-en commented 1 year ago

[Bugs](https://github.com/Eggsbox-Game-Studios/Nursery-Crimes/commit/3484453f8c101a3388e208debd08e6d45225a005) Bugs When the player remains stationary in the trigger, it reverts to default camera zoom.