Hello everybody, does anyone have an idea on how I can drag and drop an animated object? I tried by adding the drag and drop behavior to the animated object but did not work. I will be glad for any assistance.
joeb12
Did you make sure to set yes to loop in your animation properties window of the sprite on the left side of the screen?
yes I set loop to yes, all I want to do is to be able to drag the object when it is touched.
Do you have a capx to share, because it should work fine on its own.
It could be the collision polygons of the animation. You might be trying to drag it on a frame with an oddly shaped collision polygon and it's not detecting the touch properly.
Hello joeb12
I can't understand your problem. Simple example:
https://www.dropbox.com/s/pyd6se1gssrtap0/template_drag_drop_sprite.capx?dl=0
If it didn't work:
-Behavior is disabled
-iwu@OddConfection to small polygon (if you don't set the polygon it is the whole sprite)
-wrong event to drag the object ... (in simple way you do'n need an event)
-touche event is not recognized (test it with a simple touch-event: clickObject -> write in Log "Object clicked'
For more help we need your code ...
Develop games in your browser. Powerful, performant & highly capable.
Or the question is really:
How do i play a certain animation during dragging? Still a chance thats the thing, iffen you ask me.