Start a new topic

Touch and Hold an Image Drawable

Touch and Hold an Image Drawable


Hi Guys, I just want to ask if there is a way to do a "touch and hold" event in the AR world? I was trying to create a "twister game" and as long as the user is pressing on a "Circle" (imagedrawable), the game will go on. If the user releases on a "circle", the game is over. I am not sure if there is a way to do it in pure Java Script. Any ideas on how to do it? Thanks.

Hi Miguel,

Yes, you can use the AR.context.clickBehavior functionality. Set it to TOUCH_UP, and the click will fire only when the user releases his/her finger from the touchscreen.

Best,

Martin

Hi Martin,

Can I use TOUCH_UP in a specific ImageDrawable, or is it a general method? Thanks

Hi Miguel,

It's a general property that controls all clicks, you can't set it on a particular Drawable unfortunately.

Best,

Martin
Login or Signup to post a comment