point to rectangle distance
- by john smith
I have a 2D rectangle with x, y position and it's height and width and a randomly positioned point nearby it.
Is there a way to check if this point might collide with the rectangle if closer than a certain distance? like imagine an invisible radius outside of that point colliding with said rectangle. I have problems with this simply because it is not a square, it would be so much easier this way! Any help?
Thanks in advance.