I'm trying to place a circle at the mouse coordinates. I read in the mouse coordinates and pass them through RenderWindow::ConvertCoords(), and yet my results aren't what I expect. The circle is drawn a constant 1/2 width and 1/2 height down and to the right of the mouse. It does the same if I don't use the ConvertCoords. Here's the code (in PySFML):
from PySFML import sf
window = sf.RenderWindow( sf.VideoMode(800,600), "SFML Program" )
input = window.GetInput()
playerGfx = sf.Shape.Circle(400,300, 8, sf.Color.White)
running = True
while running:
event = sf.Event()
while( window.GetEvent(event) ):
if ( event.Type == sf.Event.Closed ):
running = False
mPos = window.ConvertCoords( input.GetMouseX(), input.GetMouseY() )
window.Clear()
playerGfx.SetPosition(mPos[0], mPos[1])
window.Draw( playerGfx )
window.Display()
window.Close()
Am I misunderstanding ConvertCoords or is it misbehaving?