What is strange is that the following works:
if(Sprite1.getGlobalBounds().intersects(Sprite2.getGlobalBounds())) {//Do something}
But not something like:
if(Sprite1.getGlobalBounds().contains(Sprite2.getGlobalBounds())) {//Do something}
But get the error:
no matching function for call to 'sf::Rect<float>::contains(sf::FloatRect)'
Am I using the contain function incorrectly? And does the contain function just look for Sprite2 being within Sprite1 or does it also look for intersecting? I ask because I want to have an if statement that turns true if a sprite is within or intersecting another sprite.