SFML community forums
Help => General => Topic started by: ohgodmanyo on June 28, 2021, 05:22:52 pm
-
When I use the intersects() function, it only uses the hitboxes as a rectangle i think and it isn't accurate enough. I have already heard of flood fill and all of that, but I am struggling with implementing it. I would appreciate if someone could just put the code down there to help me get perfect pixel collisions on convex polygons.
-
Pixel Perfect collision detection is pretty much always overkill, plus it won't help you with implementing the reaction steps after the collision.
But you can find such (and other) implementation here: https://github.com/SFML/SFML/wiki/Source%3A-Simple-Collision-Detection-for-SFML-2