Answer the question
In order to leave comments, you need to log in
Sprite collision?
You need to make sure that the character is pushed away from the house in the appropriate direction if he comes into contact with it. I'm probably too dumb for that.
if (partridge[1].y >= home.getPosition().y && partridge[1].y < 450 && partridge[1].x < 400)
{
if (partridge[1].x + 30 > home.getPosition().x && partridge[1].x < window.getSize().x - home.getPosition().x + 260)
{
partridge[1].x--;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question