Reputation: 955
Im trying to raycast from the bottom of a box downwards. When the box is in the floor, I'd imagine the raycast fraction value would be zero, but it always gives me 0.0149998665. To be honest, It is not logic-breaking at all, but it OCD's me alot, and I'm just wondering why this happens?
Added a little sketch to make it easier to visualize:
Upvotes: 0
Views: 292
Reputation: 8262
Polygons (and edges) in Box2D are kept at a tiny distance apart to help stability in the contact constraint solver. http://www.iforce2d.net/b2dtut/gotchas#smallgap
Upvotes: 1