scaling with touch
old_kipper
Member Posts: 1,420
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
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
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