event.phase

Type String
Event collision
Revision 2017.3060
Keywords collision, phase, physics

Overview

Indicates the collision phase for the physics collision listener:

Example

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