1
General / Re: How to draw Objects at a fixed position ??
« on: January 04, 2016, 08:25:34 am »Is your window really moving? This shouldn't affect the positioning of the drawing relative to the window.
It's more likely that you mean that your view is moving. Are you moving the view, the sprite, or both?
If you want to draw at the same place as the top left of the sprite, you can use the same coordinate as the sprite (assuming you still have its origin at the top-left).
If you want to draw at the top-left of the window, you can know what the coordinate should be or you could use one of these two things:sf::Vector2f topLeftOfWindow = window.getView().center - window.getView().width / 2.f;sf::Vector2f topLeftOfWindow = window.mapPixelToCoords(sf::Vector2i(0, 0));
You may find the tutorial on views useful
Well the thing that's moving is the background sprite. But when I moved the shapes together with the background sprite, that did the trick. Thanks for you help!!