Question by
gersomr · Dec 17, 2020 at 10:28 AM ·
c#2dcollider2dboxcollider2d
Get all the coordinates inside of a Collider Unity 2D
Hello, I wonder if there was any way to get all coordinates inside of a box collider 2d. So what I mean by that is that their random coordinates generated and checked if there inside of the collider, and if they are check if there is already a collider on that place. And if there isn't then add it into an array.
Comment
Answer by diego-giacomelli · Dec 17, 2020 at 11:04 AM
You can use Physics2D.OverlapPoint to check if there is a collider on your random generated coordinate.