1
General / the coordinate system in SFML - Help needed!!
« on: February 06, 2013, 10:57:04 pm »
ok so i have a general question about the coordinate system in SFML 2.
i understand the basics (such as the inverted y-axis).
i have read the documentation.
so i have randomly used getLocalBounds() and getGlobalBounds() mainly for setting the origin of a Sprite at its center. Sometimes i experience weird behaviour and so i really want to know what exactly the two aforementioned functions do, and how they relate to the coordinate system.
i understand there are different types of coordinates (global and world coordinates i believe?). can someone briefly describe what exactly they are because i cant seem to understand how sprite position works in terms of coordinates and pixels and screen height/width.
if someone could clarify these few things i would feel much more at ease working with a window and positioning things.
i understand the basics (such as the inverted y-axis).
i have read the documentation.
so i have randomly used getLocalBounds() and getGlobalBounds() mainly for setting the origin of a Sprite at its center. Sometimes i experience weird behaviour and so i really want to know what exactly the two aforementioned functions do, and how they relate to the coordinate system.
i understand there are different types of coordinates (global and world coordinates i believe?). can someone briefly describe what exactly they are because i cant seem to understand how sprite position works in terms of coordinates and pixels and screen height/width.
if someone could clarify these few things i would feel much more at ease working with a window and positioning things.