playMaker

Author Topic: Input.Touches[SOLVED]  (Read 2084 times)

NelsonZavala

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Input.Touches[SOLVED]
« on: March 05, 2013, 10:46:15 AM »
Hello Guys currently i purchased the INPUT.TOUCHES package and found that we can use it in playmaker, so is someone that had used the following actions?

Input Touches Get Charging Info
Input Touches Get Dragging Info
Input Touches Get Gesture Magnitude
Input Touches Get Position
Input Touches Get Swipe Info
Input Touches Get Pinch Info
Input Touches Get Rotate Info
Input Touches Get Tap Info

I will start to check what the do but if you guys can share some of your knowledges about it, it will be really appreciated.  ;D

Greetings..........................
« Last Edit: November 27, 2014, 12:00:44 AM by jeanfabre »

szomaza

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: Input.Touches
« Reply #1 on: October 14, 2014, 09:38:00 PM »
I managed to get the pinch working perfectly. With pinch magnitude I adjust the camera FOV and zoom in and out with that nicely.

What remains is to move the camera over to the center of the pinch or make it look at that position so it is not simply zooming in and out in the same position. What I would like is to allow the user to zoom in on any area of the screen.

Example: In Dragons World (https://play.google.com/store/apps/details?id=com.sq.dragonsworld) they can pinch, move AND rotate the camera around with 2 touches. I wan't to achieve that, without the rotate part.

I can get the center of the pinch using the 2 pinch positions, converting them to worldspace and LERPing half way between them and use that position to move a dummy object there, that works. Now I can see a dummy object nicely move to and with the center of the pinch.

The next problem is when I set the camera position or have it look at this point it start jumping and rotating all around the world. Why is that? Moving the camera messes up the pinching?

Thanks in advance,
szomaza

edit:
Managed to figure this out:
The problem of camera jumping all around when I wanted to move or make it look at the center of the pinch came from the fact that in another FSM I was simultaneously changing the main camera between the 3D game and 2D GUI camera.
« Last Edit: October 25, 2014, 05:59:20 AM by szomaza »