How to make the camera move/zoom to an Area2D(with collisionshape2D) position after click on it?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By QuesitoMandarina

Hi!
I’m making a click and point adventure game and I need the camera to “look” and zoom to a specific position after click on it and also how to revert it. The specific position is an Area2D with a collisionshape2D, Unfortunately I only can find tutorials and tips about how to attach the camera to the player.

:bust_in_silhouette: Reply From: exuin

You could try unparenting the camera from the player and reparenting to the clicked area2d.

:bust_in_silhouette: Reply From: scrubswithnosleeves

I Answered this live on youtube! https://www.youtube.com/watch?v=ZCcZ3-esGJ4 at about 1 hour 27 minutes.

here is the github with the solution: GitHub - ACB-prgm/QA_Sessions: A LIve QA Session

You answered my question with so much detail, Thank you so much! I’ll subscribe to your channel, I’ll learn a lot with your videos, you’re a genius!

QuesitoMandarina | 2021-05-05 00:55

Thanks for the kind words! I am glad I could help!

scrubswithnosleeves | 2021-05-05 00:56