Turns out I just called the function with the wrong paramaters by accident
Thanks for the response though
I also figured out that the variables were address locations (or so I think?), so this ended up working for me :
void interaction (sf::Sprite &sprite1, sf::RectangleShape &rect){
if(sprite1.getGlobalBounds().intersects(rect.getGlobalBounds()) == true){
rect.setFillColor(sf::Color::Black);
sprite1.move(0, -gravity);
cout<<"MOVE!";
}
}
calling it like this
interaction(sprite1,rect);