API

Function setPhysicsBodyCollisionEventsEnabled

  • Enable or disable collision-event reporting for a single body by setting its Havok event mask.

    Only bodies with events enabled contribute to the stream read by onPhysicsCollision; a collision is reported when at least one of the two touching bodies has events enabled.

    Parameters

    • world: PhysicsWorld

      The physics world owning the body.

    • body: PhysicsBody

      The body to toggle collision events on.

    • enabled: boolean

      true to report STARTED/CONTINUED/FINISHED events, false to silence the body.

    Returns void