Body:isTouching

Available since LÖVE 11.0
This function is not supported in earlier versions.

Gets whether the Body is touching the given other Body.

Using this in love.update may miss collisions, since World:update can begin and end a collision within a single call. The collision callbacks are recommended instead, when feasible.

Function

Synopsis

touching = Body:isTouching( otherbody )

Arguments

Body otherbody
The other body to check.

Returns

boolean touching
True if this body is touching the other body, false otherwise.

See Also

© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/Body:isTouching