Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SFML2] sf::Sprite::getGlobalBounds() bigger than source image?  (Read 994 times)

0 Members and 1 Guest are viewing this topic.

tschaei

  • Newbie
  • *
  • Posts: 5
    • View Profile
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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: [SFML2] sf::Sprite::getGlobalBounds() bigger than source image?
« Reply #1 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?
Laurent Gomila - SFML developer

tschaei

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [SFML2] sf::Sprite::getGlobalBounds() bigger than source image?
« Reply #2 on: May 24, 2012, 05:19:20 pm »
I found the problem, it was some buggy code by me.