How do I make certain physics objects NOT collide?

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

    [quote:2eibpv32]* 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.

  • Chipmunk physics sounds good, but I think I can't use it because of compatibility issues with Cocoon IO. Damn.

  • 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?

  • Maybe the enable/disable collisions action of the physics behavior would be of use then.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)