Detect click on Triangle and Circle buttons
- by chr1s89
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.