Polygon collision mask

How to create from two polygons one polygon, where it will be solid, where will be collsions, if the object moves on that direction with speed.

  1. Shift 2nd shape, to the target move position by speed and direction
  2. Create connections between each vectors of shapes
  3. From all, create a one shape, that shows movement mask for shape.

Hi George – did you have a solution for this? Was this a question or is it a gallery / tutorial?

Its a question, but i make AABB collision engine, maybe after, it will be fully working i will post it here, hm ?

1 Like

Sounds great!

One way to get from #2 to #3:

  • Loop over the lines in #2 and find line-line intersection points
  • Take the resulting group if points and use convex hull tc return the shape. For
    Example, see mesh library by Lee Byron.

You can think of this as taking all the intersection points from #2 – just the points – and shrink-wrapping those points to get #3.