You can support the development on the Github Sponsors page.


Tools > POINT & CIRC COLLISION


a simple tool to visualize how we can detect collisions between a point and a circle
made by txgruppi
uploaded by txgruppi
added:
updated:
download cartridge
- CLICK TO PLAY -

3


On keyboard: Arrows keys to move point. Z and X to change circle radius.
On gamepad: Dpad to move point. A and B to change circle radius.

---

2023-05-16: removed sqrt in favor of r^2 as suggested by @congusbongus
2023-01-11: Moved collision check code to its own function

Comments


congusbongus

You can avoid the costly square root by comparing against r^2

txgruppi

great tip! thanks!


Post comment