SFML community forums

Help => Graphics => Topic started by: BeautiCode on June 30, 2014, 08:43:39 am

Title: Checking if vertices come in contact?
Post by: BeautiCode on June 30, 2014, 08:43:39 am
So I was coding my first official game and got it to about 50-60% done where I needed to implement the feature to see if 2 things come in contact (A small circle with sf::CircleShape and a shape I made with an sf::Vertex array), I needed to see if the circle hit the shape I formed (Which is a triangle btw).
But I'm having trouble trying to figure out how to check and see if those 2 come in contact. Could someone help me?
And I didn't really wanna release the source until after I was finished with it.
Title: Re: Checking if vertices come in contact?
Post by: eXpl0it3r on June 30, 2014, 12:35:51 pm
Did you spend some time first for your own person research? Where exactly did you get stuck? What can't you solve on your own?

Just searching this forum will provide you with a lot of topics on collision detection and Google will just  flood you with answers. ;)
Title: Re: Checking if vertices come in contact?
Post by: Peteck on June 30, 2014, 12:51:46 pm
took me about 15 seconds to find an article about circle and triangle collision detection on google :) here you go:

http://www.phatcode.net/articles.php?id=459 (http://www.phatcode.net/articles.php?id=459)