- Home /
Physics2D.OverlapBox() not Registering TilemapCollider2D With CompositeCollise2D
Hello all. I'm trying to spawn game objects around a tilemap by checking if the object will not collide with anything before placing it. I essentially have a Decor object that contains the Required Size of the Object prefab it holds. For some reason though, Physics2D.OverlapBox() does not return a hit even if the box overlaps the walls, which have a TilemapCollider2D with a CompositeCollider2D. I've been searching for hours to find a solution, but nothing so far. I have the composite colllider's Geometry Type set to Polygons, since the Outlines mode only creates EdgeColliders that are infinitely thin. I even tried Outline mode and setting the EdgeRadius to something ridiculous like 20 and still nothing. Any help is appreciated.
Decor
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to calculate angular velocity after a collision? 0 Answers
Sprites that don't go out of the screen? 1 Answer
Photon position syncing 0 Answers