Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • b2ContactFilter

Index

Constructors

Methods

  • RayCollide(userData: any): boolean
  • 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.

    note

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

    see

    b2World.Raycast()

    see

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

  • Return true if contact calculations should be performed between these two fixtures.

    warning

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

    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.

Generated using TypeDoc