Interface PhysicsCollisionGroupListener


public interface PhysicsCollisionGroupListener
Interface to receive notifications whenever an object in a particular collision group is about to collide.

This interface is shared between JBullet and Native Bullet.

  • Method Details

    • collide

      boolean collide(PhysicsCollisionObject nodeA, PhysicsCollisionObject nodeB)
      Invoked when two physics objects of the registered group are about to collide. invoked on the physics thread.
      This is only invoked when the collision will happen based on the collisionGroup and collideWithGroups settings in the PhysicsCollisionObject. That is the case when one of the parties has the collisionGroup of the other in its collideWithGroups set.
      Parameters:
      nodeA - collision object #1
      nodeB - collision object #2
      Returns:
      true if the collision should happen, false otherwise