0
\$\begingroup\$

Is there a common practice for resolving polygon/polygon collision by sliding as shown in the image? The moving polygon is convex (and if it makes it any easier, a quadrilateral), but the polygons it is colliding against may not be, though I imagine whatever solution there is for convex polygons could be applied to concave polygons by dividing them into convex parts.

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ Have you looked into terms like "minimum separating vector"? \$\endgroup\$
    – DMGregory
    Commented Oct 21, 2022 at 10:08
  • \$\begingroup\$ A bit, but it would seem to me I'm not looking for the minimum separating vector, but the separating vector perpendicular to the direction of movement, which seems more complicated. The idea being that if the polygon is moving straight downward, it would slide around the colliding object without any loss of downward movement. \$\endgroup\$
    – IanLarson
    Commented Oct 21, 2022 at 19:21
  • \$\begingroup\$ So you shift by the minimum separating vector so that you go from an overlap to a contact on one edge, then you slide parallel to that edge by your remaining movement distance or until you reach the end of the edge and can resume movement straight down, no? \$\endgroup\$
    – DMGregory
    Commented Oct 21, 2022 at 19:25

0

You must log in to answer this question.

Browse other questions tagged .