intersects icon indicating copy to clipboard operation
intersects copied to clipboard

How to detect sprite collision,sprites are non-rectangular

Open freezyh opened this issue 2 years ago • 2 comments

image

freezyh avatar Jun 23 '22 06:06 freezyh

simplify

those are some interesting shapes, but if you're using sprites I guess you are making a game and performance matters. simplify the shapes and save some compute power for different things. in any other case complex shapes can be identified as a composition of lines

LukasOfLockless avatar Sep 15 '22 07:09 LukasOfLockless

Also, start with a simple box-box intersection check. Only do the more expensive polygon-polygon check if the box-box check succeeds.

davidfig avatar Sep 15 '22 11:09 davidfig