How to make my image or actor to be stretch-able by user?

cleveraustincleveraustin Member Posts: 15
edited November -1 in Working with GS (Mac)
In my iphone app, I am showing a full screen image.
I would like the user to be able to stretch the image to zoom in or out.
How can I do it?

In the photo album of iphone, we can stretch the photo by two finger.
How can I implement that in my app?

Thank you

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    You can get the distance between two touches with:
    magnitude( game.Touches.Touch 1.X - game.Touches.Touch 2.X , game.Touches.Touch 1.Y - game.Touches.Touch 2.Y )

    Then you can scale the actor using that distance. (Experiment by changing the actor's width and height using the distance between touches just measured.)
Sign In or Register to comment.