How to make camera move where there is a touch?

Hello all.

I have a very big picture that I can’t show all of it on any screen. My Game is a 2D game, and to the SprireRendered that holds the picture I add a colider 2D Box.

I want the player to be able to drag the picture so he will be able to see all of it.
How to move the camera to get this behavior?

You could always create a Empty GameObject, center it on the screen and have the camera target that object, and as you moved teh finger it would just actualy translate the picture position so it gives a drag effect and being able to see another part of the pic? or you mean like zoom out to see it all?

The first option…:slight_smile:

I suposse you could get the position of the first touch, then drag it and get the position where the touch ended , subtract the first with teh last and then translate the picture by that Vector you get as result.

1 Like