XNA - Detect click on triangle/circle form of a texture

Posted by chr1s89 on Game Development See other posts from Game Development or by chr1s89
Published on 2011-06-20T20:38:49Z Indexed on 2011/06/21 0:31 UTC
Read the original article Hit count: 177

Filed under:
|
|

How can i detect clicks on a texture (will be a button in my game) that has a form of a triangle or circle. I know only the rectangle solution where u can use the positions + the width/height but this dont work for that because clicks will be detected at the transparent pixels.

I heard of pixel-perfect collision is it the right way for this?

It would be great if someone can give me a example for such a solution or other.

© Game Development or respective owner

Related posts about XNA

Related posts about c#