event.y

Type Number
Event preCollision
Revision Release 2024.3703
Keywords preCollision, y
See also event.x

Overview

The y position where the pre-collision event occurred. Note that the reported collision position can be influenced by physics.setAverageCollisionPositions() and physics.setReportCollisionsInContentCoordinates().

Example

local function onPreCollision( event )
    print( "position: " .. event.x .. "," .. event.y )
end