Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Checking if vertices come in contact?  (Read 1428 times)

0 Members and 1 Guest are viewing this topic.

BeautiCode

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Checking if vertices come in contact?
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Checking if vertices come in contact?
« Reply #1 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. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Peteck

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Checking if vertices come in contact?
« Reply #2 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