SFML community forums

Help => Graphics => Topic started by: booncoder on April 21, 2010, 03:21:50 pm

Title: Width and height
Post by: booncoder on April 21, 2010, 03:21:50 pm
How can i access the width and height of a sprite to implement collision using bounding boxes?

i know there is a getSize() sprite function but it is in the form of a vector2f does that get the width and height or just the x and y poistion.
Title: Width and height
Post by: Nexus on April 21, 2010, 04:08:28 pm
sf::Sprite::GetSize() is perfectly fine. Its x component represents the width, and its y component the height.