ln206
New Member
Posts: 2
|
Post by ln206 on Oct 27, 2020 0:40:13 GMT
When I tap on an object, how do I animate pan & zoom in at the same time to that object?
|
|
|
Post by Luís Pedro Fonseca on Oct 31, 2020 14:42:50 GMT
@in206 You could create an empty GameObject that works as your camera target, and simply move it to the object you tapped.
|
|
ln206
New Member
Posts: 2
|
Post by ln206 on Nov 2, 2020 7:00:23 GMT
I tried the code below:
ProCamera2D.Instance.transform.position = Vector3.Lerp(ProCamera2D.Instance.transform.position, currentView.position, Time.deltaTime * transitionSpeed);
But it seems like, the camera just zooms in to the center without panning to the correct GameObject's position (currentView). Do you have any idea why? or is there a different method to do this with ProCamera2D.
|
|