|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContactListener
Implement this class to get collision results. You can use these results for
things like sounds and game logic. You can also get contact results by
traversing the contact lists after the time step. However, you might miss
some contacts because continuous physics leads to sub-stepping.
Additionally you may receive multiple callbacks for the same contact in a
single time step.
You should strive to make your callbacks efficient because there may be
many callbacks per time step.
Warning: The contact separation is the last computed value.
Warning: You cannot create/destroy Box2D entities inside these callbacks.
Buffer any such events and apply them at the end of the time step.
Method Summary | |
---|---|
void |
add(ContactPoint point)
Called when a contact point is added. |
void |
persist(ContactPoint point)
Called when a contact point persists. |
void |
remove(ContactPoint point)
Called when a contact point is removed. |
void |
result(ContactResult point)
|
Method Detail |
---|
void add(ContactPoint point)
void persist(ContactPoint point)
void remove(ContactPoint point)
void result(ContactResult point)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |