Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Width and height
Print
Pages: [
1
]
Author
Topic: Width and height (Read 1783 times)
0 Members and 1 Guest are viewing this topic.
booncoder
Newbie
Posts: 9
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.
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
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.
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Width and height