SFML community forums

Help => Graphics => Topic started by: tschaei on May 24, 2012, 05:00:28 pm

Title: [SFML2] sf::Sprite::getGlobalBounds() bigger than source image?
Post by: tschaei on May 24, 2012, 05:00:28 pm
I'm developing a tank game right now and am using the GlobalBounds of my Sprites for collision detection. Why does the GlobalBounds' intersects-method register collisions when the two sprites don't actually overlap, but are several pixels apart from each other?
Title: Re: [SFML2] sf::Sprite::getGlobalBounds() bigger than source image?
Post by: Laurent on May 24, 2012, 05:06:00 pm
Because there's a problem, obviously.

Can you post a complete and minimal example that reproduces this issue?
Title: Re: [SFML2] sf::Sprite::getGlobalBounds() bigger than source image?
Post by: tschaei on May 24, 2012, 05:19:20 pm
I found the problem, it was some buggy code by me.