[UNSOLVED] Detecting Collision between a polygon and a circle? PRECISE

I have posted this before but what the results were are not as accurate as I need them to be. I have two images
A snow ball,
Circle centered in a square image
And a character

thats not my exact character but something like that.

Now I need precise detection between the two. I cant just detect if the two images hit each other beacause the character does not always hit the edge of the image therefore making that type of detection inaccurate.

Im really confused…how do i do this???

You’ll want to use pixel perfect collision if it absolutely HAS to be perfect, but a square will likely work just as well if you have a character with proportions similar to that, just make the actual radius of the snowball smaller than the image or make it have a delay before disappearing/falling apart

the detection has to be pixel perfect. the images dont fill the square enough to make it work otherwise… how would i implement sometihng like this

What graphics library do you use? I can give you answer for LWJGL.

im coding eveything myself for an android app no lwjgl :frowning:

Is the polygon (character), or circle (snowball) moving?

If so, for precise collision detect you’ll need to consider the collision as a swept circle <-> polygon interaction.

Google points me to this: http://www.three14.demon.nl/sweptellipsoid/SweptEllipsoid.pdf

both objects are moving… and that website looks a little too complex for my understanding

Just thought of this, perhaps you could make something similar to hitboxes used in 3D games to fit without needing the headache that is pixel-perfect and speed up the whole process. No clue how to do this though :confused:

I’m not sure what you mean, but write now I have a detection of when the two images close, although it is not as accurate as I need it to be:(