Complicated Zoom To Finger Pinch & Spread

RedlerTechRedlerTech Member Posts: 1,583
edited November -1 in Working with GS (Mac)
Hey Everyone,
So for my next project an important part of it is going to be zoom in to see more clear. Now, I know it is possible to zoom & I know it's possible to read the finger movements because of Stormy's paper-toss template. But how would I create the zoom effect by the person pinching and spreading 2 fingers as you would in Safari on the iPad lets say. Depending on how far you spread, the more zoom. With a min & max limit of how far you can zoom in and out. Is this possible?

Matt

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    get the magnitude between touch 1 x and touch 2 x, then you can multiply that if u need a bigger number and go off that for ur zoom
  • RedlerTechRedlerTech Member Posts: 1,583
    Can you explain a little more please? Like would I do:

    Constrain scene camera size width & height to:

    Magnitude(Touch1X-Touch2X,Touch1Y-Touch2Y)

    I don't think that would work.

    Matt
  • old_kipperold_kipper Member Posts: 1,420
    its possible



    Also I think that Darren has a parachuting template that has some very cool zoom stuff in it.

    kipper
  • RedlerTechRedlerTech Member Posts: 1,583
    Is that your app? How do I use the Touch1 & 2 to determine rotation of the camera, like how it determined the rotation of the image in the video?

    Matt
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    NextGen said:
    Can you explain a little more please? Like would I do:

    Constrain scene camera size width & height to:

    Magnitude(Touch1X-Touch2X,Touch1Y-Touch2Y)

    I don't think that would work.

    Matt

    no you would have a attribute constrained to the mangiutde of touch 1 x and touch 2 x, and also have a attirubte that checks if it grew or got smaller so you know weather to add or subtract.then like i said that might be a small number so maybe multiply by 3 or something just to get it bigger. Then depending on the other attribute to detect a pull out or pinch in, you would add or subtract that from the screen size width and or heighth.

    THeres some other little tweaks and things you might need to add but thatll get you started and should give u a idea of what u wanna go for
  • RodericRoderic Member Posts: 145
    Hey old_kipper,

    That video you showed, would you be willing to share the code that does that? I've also been playing with the pinch and zoom template but I can't seem to get it smooth.

    Your help will be much appreciated.

    Thanks!
Sign In or Register to comment.