Interface PhysicsCollisionListener

All Known Implementing Classes:
DynamicAnimControl

public interface PhysicsCollisionListener
Interface to receive notifications when 2 collision objects collide.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Callback to report collisions in a CollisionSpace.
  • Method Details

    • collision

      void collision(PhysicsCollisionEvent event)
      Callback to report collisions in a CollisionSpace. Typically invoked on the render thread (not the physics thread) during the BulletAppState update.

      Typically invoked 2x for each cached contact point, so expect many invocations per collision -- up to 8 per contact manifold.

      Collisions will be reported only if the collision-group of the first collision object is set in the collide-with group mask of the 2nd.

      Implementors: don't retain a reference to the event instance, as it may be reused after the collision() method returns. In your implementation, copy all data you plan to retain.

      Parameters:
      event - detailed information about the collision (not null, reusable)