scaling with touch

old_kipperold_kipper Member Posts: 1,420
edited November -1 in Working with GS (Mac)
I've tried a number of methods that after selecting an actor with a single touch to then be able to use 2 fingers to scale it. My problem is how to get natural feel to it. The change size if fine but unless I am not seeing everything correctly only scale evenly rather than in one plane (which I want to do).

The way I am trying to do it at the moment is to read which is the first touch to screen and checking to see if it is left or right of the second touch, then subtracting the smaller x value from the larger and placing it is a number attribute that I then check to see if it has altered and is greater or lesser and that to a boolean the fires the scale up or down. The timing seems to be an issue and I wonder if others have a more elegant solution or thoughts on the matter.

cheers kipper

Comments

  • old_kipperold_kipper Member Posts: 1,420
    Thanks T-shirtbooth. I may have cocked it up but it doesn't seem to work. I shall think on and continue to beat head against side of monitor/passing strangers/empty beer bottles. cheers kipper
  • old_kipperold_kipper Member Posts: 1,420
    Ive got some nice things going on with sizing but not the constraints or both touches in different orders.

    new game attribute interger- 'put x'

    then on then on the background actor

    timer every 0 seconds

    change attribute game 'put X' to game.Touches.Touch 1.X - game.Touches.Touch 2.X

    then in the changing actor

    timer every 0 seconds

    rule attribute game touches >1 +attribute game. 'put X' >32

    interpolate self size width to game "put X' Value

    this is only set up for doing the right hand first touch but seems to work
Sign In or Register to comment.