01-21-2023, 05:33 PM
Another solution here is to simply check the 8 points of the star for collisions. Since they protrude out beyond the base by such a large degree, chances are that no matter what direction you're traveling in, they're going to be the first point for a collision. Sure, there may be some oddish occurrences where an oddly shaped object would perfectly miss that point and hit the image anyway (such as a straight line from a laser beam), but those unique objects are going to fall outside the norm in most cases. Unless you just absolutely need pixel perfect collision detection, protruding point collision may be much faster and easier to check for, and still hold true in most cases for you.