1
Graphics / Re: I have a referenced sprite that I can't change the position of
« on: May 05, 2014, 06:48:21 am »
And this is why I ask questions. So I need an initialization list, huh? Thanks.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Because implicit conversions decrease type safety.
The coordinates are in pixels, which are integral.
But you have still not mentioned why you don't want to use the correct way (mapPixelToCoords).
Mouse position coordinate are always integer, a mouse is on a pixel, but can't be between 2 pixels.
If you want to "convert" the mouse position to a world position, you might want to use mapPixelToCoords anyway and it returns an sf::Vector2f.
What would that change? Conversion constructors are there to construct from another, existing object...