Hoping someone can explain why I'm getting a single collision point or offer an alternate solution to my problem.
I have a polygon composed of about 8 vertices that is roughly 40 pixels high and 200 pixels wide. When the user touch above this polygon, I'm trying to determine the point closest to the touch. My naive approach was to create a square that is 5 pixels wide and 80 pixels high (centered on the touch point) and applying b2CollidePolygons() to these two polygons. I expected to receive contacts at both the top and bottom of the platform.
I am getting contacts but only one.
I have a polygon composed of about 8 vertices that is roughly 40 pixels high and 200 pixels wide. When the user touch above this polygon, I'm trying to determine the point closest to the touch. My naive approach was to create a square that is 5 pixels wide and 80 pixels high (centered on the touch point) and applying b2CollidePolygons() to these two polygons. I expected to receive contacts at both the top and bottom of the platform.
I am getting contacts but only one.