playMaker

Author Topic: Touch action for 2D object  (Read 1601 times)

ShazBang

  • Playmaker Newbie
  • *
  • Posts: 33
Touch action for 2D object
« on: January 02, 2017, 07:16:48 AM »
I have a sprite that I would like to be able to touch, and have it respond to the user's input. However, I can't find an actual Touch action to kick things off, Mouse Down doesn't work and says I need a collider on the sprite, which still doesn't work.

What should I do?

Thanks.

edwardr

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Touch action for 2D object
« Reply #1 on: February 21, 2017, 10:10:09 AM »
do you mean something like that:
http://hutonggames.com/playmakerforum/index.php?topic=14401.0

I'm able to move an object, but it doesn't work correctly. Maybe it gives you some idea for your problem

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Touch action for 2D object
« Reply #2 on: April 13, 2017, 02:52:17 AM »
Hi,

 yes, Sprite must have a collider2d to start responding to touch inputs.

If mouse down doesn't work, you have problem, touch won't work too.

I suggest using EasyTouch or InputTouches on the asset store, they both have proper PlayMaker support and will provide proper touch support and all the gestures we generally associate with touches.

 Bye,

 Jean



HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: Touch action for 2D object
« Reply #3 on: April 13, 2017, 09:09:00 AM »
none of these will work?



on the ecosystem there is even more

can the collider be a trigger?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Touch action for 2D object
« Reply #4 on: April 18, 2017, 02:45:33 AM »
Hi,

 yes, they all should work for sure. But these action are raw and the work done inside Input.touches and easy touche is massive in terms of functionalites, I would definitly suggest for the sake of learning that you try to create your own library of touch events using raw actions and you'll quickly see how complex and painfull this is... hence why I suggest you go for these assets which will save you days/weeks of work.


a collider can be a trigger for touches yes.

 Bye,

 Jean