Once I detect a collision through a contact listener, is there a way to know how much penetration there is between the two objects (or how far apart their colliding points are)?
Here's the situation: In my game I have a setup phase where the user can move items around. We don't want them to interpenetrate, so if they collide, I mark them as invalid positions. Unfortunately, right now Box2D reports a collision even if the objects are not interpenetrating but are within the slop distance. Ideally, I'd like the user to be able to get them very close, but not quite interpenetrating.
Any thoughts?
Here's the situation: In my game I have a setup phase where the user can move items around. We don't want them to interpenetrate, so if they collide, I mark them as invalid positions. Unfortunately, right now Box2D reports a collision even if the objects are not interpenetrating but are within the slop distance. Ideally, I'd like the user to be able to get them very close, but not quite interpenetrating.
Any thoughts?