Hi everyone,
first at all - I really like the SFML, but sometimes I got problems that gives me a headache
I want to test the collosion between two sprites. Actually no problem with functions like for example
Player.GetPosition().x or
Player.GetSize().x.
But unfortunately it works rather complicated...
this is my code
if(Window.GetInput().IsKeyDown(sf::Key::Right))
if(Player.GetPosition().x + Player.GetSize().x <= Wall.GetPosition().x)
{
//not the important part...
if(Player.GetPosition().x <= 1024-Player.GetSize().x) Player.Move( 400*Window.GetFrameTime(), 0);
}
The red one should be the player, and the wall is the fenceThere everything works perfect... I´m not able to move the "player" to the right side.
But there I´m also not able to move the player to the right side? Why?
thanks in advance