Drag Actor with Finger Issue
JoshKahane
Member Posts: 470
Hi
I want to be able to drag an actor with my finger which I have far accomplished by constraining the x and y of the actor to touch 1. However I can still tap anywhere on the screen and it will of course jump to the position of touch 1. How can I avoid this? I only want to be able to drag.
Thanks.
I want to be able to drag an actor with my finger which I have far accomplished by constraining the x and y of the actor to touch 1. However I can still tap anywhere on the screen and it will of course jump to the position of touch 1. How can I avoid this? I only want to be able to drag.
Thanks.
Comments
This is how I do it
on the actor that you want to drag your going to make a boolean attribute called "grab" set its default to false.
Make a rule stating when Actor is touched turn "grab" true.
then while "grab" is true constrain actors "X" and "Y" to mouse position.
Hope this helps
Just tried it, worked a charm! Thank you.