Interface ContactListener
public interface ContactListener
Notified when bodies in a PhysicsWorld start and stop touching. Register with
PhysicsWorld#addContactListener(ContactListener).
Callbacks fire from inside PhysicsWorld#step(float) -- i.e. on the game loop
thread -- so it is safe to read and update game state directly, but you must not
create or destroy bodies during the callback (defer that until after step
returns).
-
Method Summary
Modifier and TypeMethodDescriptionvoidbeginContact(PhysicsContact contact) Called when two fixtures begin touching.voidendContact(PhysicsContact contact) Called when two fixtures stop touching.
-
Method Details
-
beginContact
Called when two fixtures begin touching. -
endContact
Called when two fixtures stop touching.
-