Zoom2D go and return smoothly
Posted: Fri May 28, 2021 9:36 am
Hi! I've set up a Zoom2D that moves from a Capsule Collider to the transform of another GameObject, and that works perfectly.
Then I set a delay for 2 seconds and then the camera returns instantly to the character.
What I would like to do is to smoothly return the camera to the character just as it went to the point of interest.
I tried with that code but rather than doing the first camera translation smoothly, it just zooms slightly out, then teleports to the point of interest, waits and comes back.
"Speaker" is the thing I wanna look at and the "Listener" is the object that contains the trigger.
I'm sure I'm missing something super easy but I'm not getting it lol.
The project is using the 3D with a 2D ortographic perspective and cameras.
Then I set a delay for 2 seconds and then the camera returns instantly to the character.
Code: Select all
Zoom2D(listener,5.5,1);
Delay(2);
Code: Select all
Zoom2D(listener,5.5,1);
Delay(2);
Zoom2D(speaker,5.5,1);
"Speaker" is the thing I wanna look at and the "Listener" is the object that contains the trigger.
I'm sure I'm missing something super easy but I'm not getting it lol.
The project is using the 3D with a 2D ortographic perspective and cameras.