I'm trying to determine which side of my object a collision is happening. In all of my searching, I have found 2 different proposed solutions, but each one has a major issue. I'm hoping that someone here can explain what steps I am missing.
Attempt 1 : Sensors
The first solution I tried was using Sensors on the sides of a Dynamic body. Like this :
The issue with this solution is that multiple sensors can easily collide with a single obstacle, like this :
Attempt 2 : Determine side of contact using the World Normal
My second solution was to get the Normal from the b2WorldManifold that is provided by the contact in BeginContact(). This works perfectly, but only for detecting the side when a collision begins, not when it ends. EndContact() doesn't have the ability to provide a World Normal. You can get the manifold, but the components of the Normal are undefined. The issue with this is that I have no way of knowing which collision just ended.
Hopefully someone knows enough about Box2D to see something simple that I am obviously missing. Thanks in advance for any input.