How do I make certain physics objects NOT collide?

Get help using Construct 2

Post » Mon Mar 28, 2016 2:48 pm

Hello,

I have a small problem: I got three physics objects called A, B, C. Now I want only two of them to collide, will being unaffected by the third one. Like this:

A can collide with B and vice versa
A can collide with C and vice versa
B can NOT collide with C and vice versa, the objects should simply pass each other unaffected

Is there a way of getting this to work?

In general, it would be great if one could simply put physics objects on different layers so they won't interact with each other.
B
17
S
7
G
2
Posts: 110
Reputation: 2,665

Post » Mon Mar 28, 2016 3:10 pm

I don't think Constructs Box2d physics engine supports collision groups,
One solution would be to use R0j0hound's Chipmunk physics behaviour which supports collision groups and collision layers.
* Collision filtering:
1. Collision groups that allow objects not to collide with other objects in the same non-zero group.
2. Collision layers which is basically 32 different layers, and the object can be in any number of them, and will only collide with objects that share a layer.
B
19
S
7
G
3
Posts: 28
Reputation: 2,438

Post » Mon Mar 28, 2016 3:26 pm

Chipmunk physics sounds good, but I think I can't use it because of compatibility issues with Cocoon IO. Damn.
B
17
S
7
G
2
Posts: 110
Reputation: 2,665

Post » Sun Aug 21, 2016 10:58 pm

I have tried Chipmunk Physics and sadly it is not suitable for my project.

All I really need is being able to make collision groups, nothing more than that.

Anyone knows helpful plugins besides Chipmunk Physics? Or any other solution?
B
17
S
7
G
2
Posts: 110
Reputation: 2,665

Post » Mon Aug 22, 2016 7:35 am

Maybe the enable/disable collisions action of the physics behavior would be of use then.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests