# Circle Collision Radius

Get help using Construct 2

### » Mon Aug 06, 2012 10:28 pm

You seem to already have the answer - just check if the distance between the coordinate you want to check and the center of the object is smaller than the circle radius - if it is, there's a collision.
if you want to check between two circles, the process should be very similar, and extremely simple as well: the distance between the objects should be less than the sum of their respective radii for a collision to happen.

If you need something else, try this:
Collision detection and reaction
it's made for AS3, but one with your knowledge level should be able to port the code easily :)Fimbul2012-08-06 23:07:48
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

### » Tue Aug 07, 2012 7:05 pm

The problem is that it's a physics game entirely made of circle based sprites. That's why i asked. If it were just a simple collision detection of course i code code it myself...
I'll test to see how things go with fake polygon circles. But adding control to circle body is very important imo. Other thing is adding the rest of joints like MouseJoint and adding Kinematic Control.Kiyoshi2012-08-07 19:19:49
B
58
S
15
G
11
Posts: 632
Reputation: 13,445

### » Tue Aug 07, 2012 7:30 pm

Sounds like you need to put in a request to have some primitives, other than box in the editor.
The question is what other primitives would be useful while not taxing the system too much.

@Ashley might say that an octagon would be too much, where something like an iso square would be about the same.
B
176
S
50
G
200
Posts: 8,636
Reputation: 124,573

### » Tue Aug 07, 2012 8:15 pm

For some reasons I did a square invisible player and pinned some objects on him.

One of them was a circle with Physics behavior, where have that circle collision mask.

I used the circle to smoothly the detection between the player and some physic boxes on the screen.

Following this philosophy, you'll be able to reach what you want mixing it with the other types of collisions in your game, and of course, if you change the sprite size, the circle also change.

A long discussion was made about the circle polygon, on Stencyl community, and the result was No, they didn't implemented it because of the issues around the Hardware usage and performances.

B
109
S
24
G
18
Posts: 1,388
Reputation: 22,956

### » Sat Mar 03, 2018 2:34 am

B
35
S
5
G
1
Posts: 169
Reputation: 2,765

### » Sat Mar 03, 2018 9:37 am

@Scofano

Seems a bit pointless to me making a post in a thread from over 5 years ago.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
142
S
32
G
89
Posts: 5,812
Reputation: 62,218

Previous