I have an sf::VertexArray, with two points, and a primitive type of sf::LineStrip. I want to detect if an object (which will be an sf::RectangleShape) is overlapping on this line.
Reading the documentation, I was drawn towards sf::VertexArray::getBounds(), however it appears that returns a rectangle containing both points. This is not what I want. I would like it so that I can calculate whether or not an object is actually touching the rendered line, which spans between the two vertexes.
I have looked at the documentation ,however I cannot appear to find a solution with my desired effect. I cannot find it on the forums either. How would I be able to do this?