Limit drag to another sprites image area

Get help using Construct 2

Post » Thu May 10, 2012 9:16 pm

Hej there :-)
I am using drag and drop behavior and i want to drag a small circle that is within a big circle.
I want to make it so the small circle can not come out of the big circles image, even though the small circle its still being dragged. I this possible whit drag and drop Behavior?

Hope it makes sense :-)
B
4
S
1
Posts: 23
Reputation: 946

Post » Thu May 10, 2012 9:36 pm

How about if you add the condition:

if smallcircle is overlapping bigcircle

B
63
S
23
G
17
Posts: 254
Reputation: 14,342

Post » Fri May 11, 2012 6:54 am

Thanks for the quick anwser :)
I have tried that and i can only get it to stop draggin when is not overlapping
What want is
Cuntinue dragging it, but the small circle should be trapped inside the big circle.

B
4
S
1
Posts: 23
Reputation: 946

Post » Fri May 11, 2012 2:08 pm

in this particular situation you just want a distance constraint
distanceConstraint.capx
The green circle is drag&droppable
Last edited by Yann on Sun Sep 14, 2014 8:33 pm, edited 2 times in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon May 14, 2012 5:37 pm

Thaks so much for the file :-D thats exactly what i was aiming for.

After a lot of work i could first check it today.
Made my dag :-)

B
4
S
1
Posts: 23
Reputation: 946


Return to How do I....?

Who is online

Users browsing this forum: flemmig and 32 guests