How To Apply Pinch Effect

creativeappscreativeapps Member Posts: 1,770
edited November -1 in Working with GS (Mac)
Hello Friends, I want to apply Pinch effect. I allready got pinch zoom tutorial from NEW+.
What I want to do is when user pinch the screen that time I want to draw 1 line between 2 fingers.
How to do that? Please help me out.

Thanks

Comments

  • creativeappscreativeapps Member Posts: 1,770
    anyone here to give my proper answer?
  • creativeappscreativeapps Member Posts: 1,770
    hello please someone give proper answer
  • DrGlickertDrGlickert Member Posts: 1,135
    If you click on NEW under the main GS creator screen and search for "zoom" SciTunes has a template that has zoom in and zoom out features.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you might actually try searching for a pinch demo. I have seen one before I just don't remember what it was called.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Here's one way to do it. Look at my pinch to zoom demo. If I remember right there is a attribute that is switched on when the pinch action takes place. When this attribute is true have an actor with its alpha 0 change to alpha 1

    then do this in that actor
    rule - if touch1x is greater than touch2x
    change self.positionX to ((touch1.x-touch2.x)/2)+touch1.x
    otherwise
    change self.positionX to ((touch2.x-touch1.x)/2)+touch2.x

    rule - if touch1y is greater than touch2y
    change self.positionY to ((touch1.y-touch2.y)/2)+touch1.y
    otherwise
    change self.positiony to ((touch2.y-touch1.y)/2)+touch2.y

    change self.size width to magnitude(touch1.x-touch2.x,touch1.y-touch2.y)

    change self.rotation to VectorToAngle(touch1.x-touch2.x,touch1.y-touch2.y)

    set the height to however thick you want this actor to be.
Sign In or Register to comment.