- Home /
How can I detect non-rectangular bounds?
I'm generating random 2D shapes with all types of forms, e.g. spirals, stars, U-shaped, etc. These are generated in random positions that are close enough to be connected by these little bridges. However they should never overlap. If I have an "L7" shape (these are sprites by the way), the "L" sprite should not be limited by it's rectangular bound so that the "7" can be closer to the "L". I've seen many do it with bounds, but not the sprite's drawn area. They should be close but not collide, like the % shape, which would normally collide with rectangular bounds. If the performance is affected by adding a rigid body 2d, then I prefer to do it without, as all is serves as is a floor, no other interaction is programmed with the player. The interaction with the player is an invisible collider around it.
Your answer
![](https://koobas.hobune.stream/wayback/20220613180955im_/https://answers.unity.com/themes/thub/images/avi.jpg)