Implement this class to provide collision filtering. In other words, you can implement this class if you want finer control over contact creation.

Constructors

Methods

  • Return true if the given fixture should be considered for ray intersection. By default, userData is cast as a b2Fixture and collision is resolved according to ShouldCollide.

    Parameters

    • userData: any

      User provided data. Comments indicate that this might be a b2Fixture.

    Returns boolean

    True if the fixture should be considered for ray intersection, otherwise false.

    This function is not in the box2dweb.as code -- might not work.

    • b2World.Raycast()
    • b2ContactFilter.ShouldCollide()
  • Return true if contact calculations should be performed between these two fixtures.

    Parameters

    • fixtureA: b2Fixture

      b2Fixture potentially colliding with fixtureB.

    • fixtureB: b2Fixture

      b2Fixture potentially colliding with fixtureA.

    Returns boolean

    True if fixtureA and fixtureB probably collide requiring more calculations, otherwise false.

    For performance reasons this is only called when the AABBs begin to overlap.