Type String Event collision Revision Release 2022.3683 Keywords collision, phase, physics
Indicates the collision phase for the physics collision listener:
"began"
— indicates that a collision between two bodies has started initial contact."ended"
— indicates that a collision between two bodies has completed.local function onCollision( event ) if ( event.phase == "began" ) then print( "began: " .. event.object1 .. " & " .. event.object2 ) elseif ( event.phase == "ended" ) then print( "ended: " .. event.object1 .. " & " .. event.object2 ) end end