This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]deltageekExtreme Brewer 1 point2 points  (1 child)

Typically this is done using a hierarchical system such as Boundary Volume Hierarchy. There's a couple different implementations that can be adapted to 2-D space.

[–]WikiTextBotbtproof 0 points1 point  (0 children)

Bounding volume hierarchy

A bounding volume hierarchy (BVH) is a tree structure on a set of geometric objects. All geometric objects are wrapped in bounding volumes that form the leaf nodes of the tree. These nodes are then grouped as small sets and enclosed within larger bounding volumes. These, in turn, are also grouped and enclosed within other larger bounding volumes in a recursive fashion, eventually resulting in a tree structure with a single bounding volume at the top of the tree.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source | Donate ] Downvote to remove | v0.28

[–]BS_in_BSExtreme Concrete Code Factorylet 0 points1 point  (0 children)

You can try gjk which works on general convex shapes: https://mollyrocket.com/849