Drag actor to another actor and they change place!?
Andre_Dani
Member Posts: 22
I have a big problem! I have in six days tried to drag an actor and change place with another actor i hover over(or inside with mouse/touch). For example(when you change place with apps in the iphone). Thats how i want it to work.
Can someone help me or anyone know any good tutorial or with similar problem?
I get it to work but i have put some timers in my actor so after a few drag and drops it starts to jump in not accepting behaviors.
i´m starting to loose my mind! the timers and rules can someone start at the exact same time so i dont get it to work without a bug.
Please help me!?
Regards!
Can someone help me or anyone know any good tutorial or with similar problem?
I get it to work but i have put some timers in my actor so after a few drag and drops it starts to jump in not accepting behaviors.
i´m starting to loose my mind! the timers and rules can someone start at the exact same time so i dont get it to work without a bug.
Please help me!?
Regards!
Comments
track your items x and y position with global attributes.
This way you can use press or release rules (whatever works best for you) to make the change. By tracking positions you will know where to snap them to.
It A is colliding with B AND touch is pressed
when release happens
move A to B's X and Y and
move B to A's X and Y
You will have to deal with some sort of only update position o.x seconds so that that you can swap last position instead of current postion
There is a lot going on with what you want to do but that is a start.
Also depending on the situation you may also be able to fake item swapping by only changing the image and the rules inside the actors.
isn´t there any tutorial on this? or something similar?