Function
World:setCallbacks( add, persist, remove, result )
Set functions to be called when shapes collide.

Four Lua functions can be given as arguments. The value nil can be given for events that are uninteresting.

When called, each function will be passed three arguments. The first two arguments (one for each shape) will pass data that has been set with Shape:setData (or nil). The third argument passes the Contact between the two shapes.

Synopsis
World:setCallbacks( add, persist, remove, result )
Parameters
add function Called when two shapes first collide.
persist function Called each frame, if collision lasts more than 1 frame.
remove function Called when two shapes finish colliding.
result function No idea. Never seems to be called...
Copyright © 2006-2010 LÖVE Development Team.