API

Class PhysicsShapeContainer

A shape container holds a variable number of shapes. Use AddChild to append to newly created parent container.

Hierarchy (View Summary)

Index
_pluginData: any = undefined

V2 Physics plugin private data for single shape

  • get filterCollideMask(): number

    Returns number

    Bitmask of categories that this shape should collide with

  • set filterCollideMask(collideMask: number): void

    Sets the collide mask of a shape. This is a bitfield of arbitrary "categories" to which this shape collides with. Given two shapes, the engine will check if the collide mask and membership overlap: shapeA.filterMembershipMask & shapeB.filterCollideMask

    If this value is zero (i.e. shapeB only collides with categories which shapeA is not a member of) then the shapes will not collide.

    Note, the engine will also perform the same test with shapeA and shapeB swapped; the shapes will not collide if either shape has a collideMask which prevents collision with the other shape.

    Parameters

    • collideMask: number

      Bitmask of categories this shape should collide with

    Returns void

  • get filterMembershipMask(): number

    Get the membership mask of a shape.

    Returns number

    Bitmask of categories which this shape is a member of.

  • set filterMembershipMask(membershipMask: number): void

    Set the membership mask of a shape. This is a bitfield of arbitrary "categories" to which the shape is a member. This is used in combination with the collide mask to determine if this shape should collide with another.

    Parameters

    • membershipMask: number

      Bitfield of categories of this shape.

    Returns void