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

Author Topic: Width and height  (Read 1783 times)

0 Members and 1 Guest are viewing this topic.

booncoder

  • Newbie
  • *
  • Posts: 9
    • View Profile
Width and height
« 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.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Width and height
« Reply #1 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: