19.9.5
addPostStepCallback
self = physics.Space:addPostStepCallback(body|shape|constraint,
function(space, object)
...end )
Parameter |
Type |
Description |
---|---|---|
self |
in physics.Space |
The input simulation Space |
body or shape or constraint |
in physics.Body or physics.Shape or physics.Constraint |
A simulation object that will receive attention after the simulation step |
function |
in function(space, object) |
The callback function to run against the simula- tion object at the end of the simulation step |
self |
out physics.Space |
The input Space is returned as the output |
Adds a callback function to be called when the current step is finished. One callback may be registered per Body, Shape, or Constraint. Only the first callback for a given object is registered. Any attempt to register another callback for the same object is ignored.
Returns self.
Introduced in platform.apiLevel = '2.0'