What it does
physics2D.rayCast takes x1, y1, x2 and y2.
Signature
physics2D.rayCast(x1, y1, x2, y2)Arguments
x1y1x2y2
Example · generated
function update(dt) { physics2D.rayCast(100, 120, 100, 120);}physics2D.rayCast 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.