zoom camera to specific x,y coordintate
I understand that the camera can not be controlled unless you are in the "scene" to access its attributes.
I can make the camera "zoom" to a specific x,y coordinate by using interpolate size of image and the position of the camera.
But that is a one shot thing - touch the scene and it zooms to those 2 points.
What to do if I would like multiple different areas to be zoomed in on?
I can make the camera "zoom" to a specific x,y coordinate by using interpolate size of image and the position of the camera.
But that is a one shot thing - touch the scene and it zooms to those 2 points.
What to do if I would like multiple different areas to be zoomed in on?
Comments
Here's what developed.
If you want multiple zoom points, then create invisible hotspots with data for the camera attribute changes.
If your talking about the movement of the camera (not a straight zoom in) I wanted that to appear as if the actor was looking around and then focusing on one area.
Thanks
To zoom the camera, you make the X and Y size smaller.
To pan the camera, you change the camera's origin location.
constrain att - self.positionX = game.mouse.positionX
constrain att = self.positionY = game.mouse.positionY
This all works fine.
I would like to control the camera along with moving the actor to the game.mouse.position X&Y.
This would have to be in the scene to access the camera attribute.
game.scene.camera ??? Is it possible to make the camera go to game.mouse.position X&Y?