This is particularly useful for mouse interaction with the shapes. By looping through all shapes and testing the mouse position with this function, we can find which shapes the mouse touches.
There's a bug in 0.8.0 preventing this function from working.
Available since LÖVE 0.8.0
This variant is not supported in earlier versions.
hit = Shape:testPoint( tx, ty, tr, x, y )
number tx
number ty
number tr
number x
number y
boolean hit
Removed in LÖVE 0.8.0
This variant is not supported in that and later versions.
hit = Shape:testPoint( x, y )
boolean hit
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/Shape:testPoint