What it does
physics2D.getFirstContact reads FirstContact on a physics2D object. It takes no arguments.
Signature
physics2D.getFirstContact()Arguments
It takes none.
Example · generated
function update(dt) { const firstContact = physics2D.getFirstContact();}physics2D.getFirstContact is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.