peterje Posted January 2, 2021 Share Posted January 2, 2021 Currently, the Sprites in my game only have rectangular collision detection, but more complex shapes for their hitArea. This makes drag & drop very nice but I am wondering if the same is possible for collision detection. Somehow, Scratch has this ability. As shown here, even for shapes where a hull would not be very good, the collision detection is still perfect. Anyone have an idea if this can be done in PIXI? Or am I just limited to rectangular collision detection? For example, a sample sprite I have looks like this: And the hitArea I generated looks like this: The hit area is represented as an array of polygons: Assuming each of my sprites also has a hitArea of N polygons, is there a library I can use to detect collision between the two? I looked at the Separate Axis Theorem, but that seems to only work when each sprite can be represented as a single polygon. However, mine are represented as many polygons together. Any suggestions? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.