Search Issue Tracker
Fixed in 4.5.2
Votes
10
Found in
4.5.0f6
Issue ID
610864
Regression
Yes
Box Collider 2D does not collide when its size is small (like 0.01)
Reproduced with:
Unity Version 4.5.0f6 (fd4616464986)
Resolution:
4.5 includes the latest Box2D which fixes a number of issues, one of which is correctly handling colliders (fixtures) that are too small. When Box2D encounters a collider that is too small it simply throws an assert. To counter this we perform the exact same checks that Box2D does including checking for vertex being too close, colinearity, and area being too small.
If any of these checks fail we simply don't create the Box2D collider. We don't push this as a warning to the console as this would cause a lot of spam to be generated. You will notice that the gizmo doesn't render in this case.
Upon further consideration, we feel that simply not rendering the gizmo isn't adequate so in Unity 4.5.1 (patch 2) we are adding a warning on the collider indicating that it couldn't complete the request to Box2D.
In all cases where you previously were using polygon/box to produce very thin colliders, it is highly recommended that you use the edge collider instead.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
engrato
May 31, 2014 14:27
Anything below this value makes the collider gizmos disappear from the scene view.
engrato
May 31, 2014 14:25
I also noticed this behaviour. From what I tested, the minimum value is 0.05.