How do I keep a object within a circle

Get help using Construct 2

Post » Fri Oct 09, 2015 4:11 pm

Hi Yall,

I've tried all i can and i could not find the solution somewhere on here so i want to ask here how i can fix this.

I have a circle and a dot. You can drag the dot within the circle but it should lock within the circle.

So you should be able to keep dragging the dot but it should not leave the circle.

I've uploaded a .capx. The dot should always be draggable within the circle but not leaving it.

I've managed to let it stop on a specific distance but i don't want it to stop i want it to simply follow the collision polygon from the circle if dragged to the other side for example.

I hope i made myself clear ( i'm terrible in explaining. )

Thanks in advance!

The Capx: https://www.dropbox.com/s/g5bntkzqpwegc ... .capx?dl=0
B
10
S
4
G
3
Posts: 181
Reputation: 2,551

Post » Fri Oct 09, 2015 5:06 pm

I made something but I don't know if you can implement it in your game or even if its that what you want.
https://drive.google.com/file/d/0B5FlDY ... sp=sharing

You have to exchange the rotating square with a dot or something so that the rotation isn't visible anymore.
B
24
S
3
G
1
Posts: 464
Reputation: 2,191

Post » Fri Oct 09, 2015 5:20 pm

B
94
S
33
G
125
Posts: 5,458
Reputation: 79,979

Post » Fri Oct 09, 2015 5:33 pm

@Asmodean Thanks for your reply

@R0j0hound Thats the solution! Thanks!

Gosh i wish i knew the right search terms.
B
10
S
4
G
3
Posts: 181
Reputation: 2,551


Return to How do I....?

Who is online

Users browsing this forum: AbusiveChAoS, newt, Yahoo [Bot] and 9 guests