How do I make it detect collision inside a circle?

Get help using Construct 2

Post » Sat Apr 12, 2014 3:09 pm

Hey guys,

I need to make the red area on this object (image attached) detect collision, is that possible? Collision polygon only detect collision around an object, not inside.

Thanks,
Dan
You do not have the required permissions to view the files attached to this post.
B
8
S
1
Posts: 65
Reputation: 1,108

Post » Sat Apr 12, 2014 3:45 pm

My solution for this would to use a second object and mount them together.
Make the red inside the gray a separate object so it handles it's own collisions.
B
43
S
12
G
6
Posts: 446
Reputation: 6,807

Post » Sat Apr 12, 2014 4:02 pm

Sargas wrote:My solution for this would to use a second object and mount them together.
Make the red inside the gray a separate object so it handles it's own collisions.


I would but that would contain to many collision points. The object is continuously rotating, I would make separate little objects but then I can't make them rotate together with the main object. I don't know any easy way of doing this.
B
8
S
1
Posts: 65
Reputation: 1,108

Post » Sat Apr 12, 2014 4:57 pm

As Sargas said, you can use an other object (with small size and low point count) to build an interior and exterior frame that detects collisions. Use the Pin behavior to make the instances of this collision object follow and rotate with your Sprite.

A high detail collision polygon however won't be inefficient if there is only one object. Even if there are many, if not on screen at the same time, you can disable them and only activate the rotation, collisions and physics when they are on screen, thus gaining performance.

Here is an example using both methods at the same time. I don't know which is more efficient, you can play around and figure it out ;)

http://www.eli0s.com/Tests/Rotator.capx
Last edited by eli0s on Mon May 19, 2014 5:42 pm, edited 2 times in total.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Sat Apr 12, 2014 5:19 pm

i eli0s thanks for that, your capx doesn't seem to work on my C2. It says I need to download the latest version. You must be using the beta.
B
8
S
1
Posts: 65
Reputation: 1,108

Post » Sat Apr 12, 2014 8:24 pm

Thanks eli0s and Sargras, I got it sorted. I created another object, created many instances and pinned it to main object.
B
8
S
1
Posts: 65
Reputation: 1,108

Post » Sat Apr 12, 2014 9:00 pm

@dankhan , yes, I use the latest beta. Glad you sorted it out anyway!
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379


Return to How do I....?

Who is online

Users browsing this forum: jezjones24, matriax, newt, R0J0hound and 24 guests