playMaker

Author Topic: TouchObjectEvent and dragging outside the trigger  (Read 2506 times)

kiko

  • Playmaker Newbie
  • *
  • Posts: 17
TouchObjectEvent and dragging outside the trigger
« on: August 14, 2013, 11:15:45 AM »
Hi everyone! iPhone question here.

I have a cube with a trigger flag and TouchObjectEvent on it. I need to send an event when the player drags his finger outside of the cube.

I thought this is what TouchCanceled is for, so I set my event on that, but no luck.

Any idea how to do this?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: TouchObjectEvent and dragging outside the trigger
« Reply #1 on: August 16, 2013, 05:10:54 AM »
Hi,

 No, TouchCanceled is when the touch goes outside the screen. For object, you'll need to check with raycast what's underneath the touch position.

bye,

Jean

11pika11

  • Playmaker Newbie
  • *
  • Posts: 5
Re: TouchObjectEvent and dragging outside the trigger
« Reply #2 on: August 20, 2013, 11:35:31 AM »
hey
You could also set an invisible trigger just outside the cube you want to detect. when touch starts or is stationary (don't remember) will mean than the finger has moved from the cube.
But it all depends on the game the ray-casting method is also good.