PackageBox2D.Dynamics
Classpublic class b2ContactListener
Sourceb2ContactListener.as

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: You cannot create/destroy Box2D entities inside these callbacks.



Public Methods
 MethodDefined by
  
Add(point:b2ContactPoint):void
Called when a contact point is added.
b2ContactListener
  
Persist(point:b2ContactPoint):void
Called when a contact point persists.
b2ContactListener
  
Remove(point:b2ContactPoint):void
Called when a contact point is removed.
b2ContactListener
  
Result(point:b2ContactResult):void
Called after a contact point is solved.
b2ContactListener
Method detail
Add()method
public function Add(point:b2ContactPoint):void

Called when a contact point is added. This includes the geometry and the forces.

Parameters
point:b2ContactPoint
Persist()method 
public function Persist(point:b2ContactPoint):void

Called when a contact point persists. This includes the geometry and the forces.

Parameters
point:b2ContactPoint
Remove()method 
public function Remove(point:b2ContactPoint):void

Called when a contact point is removed. This includes the last computed geometry and forces.

Parameters
point:b2ContactPoint
Result()method 
public function Result(point:b2ContactResult):void

Called after a contact point is solved.

Parameters
point:b2ContactResult