I have to write a pygame program for a school project and I run into some issues concerning mouse.set_pos. I need to set the mouse position on the start of my program. Here I have set it to the middle of my little window, but everytime I run it, the mouse is not set to the middle of my window…
Tag: mouse
User needs to move mouse to fire bullet
When the user hits q to fire a bullet, there is no smooth motion. They need to move the mouse around the screen in order for the bullet to travel. I’ve tried looking around StackOverflow, youtube, reorganizing the code. I want the user to hit q and the bullet should fire with a parabola shape smoothly. Answer You’ve to do
Controlling mouse with Python
How does one control the mouse cursor in Python, i.e. move it to certain position and click, under Windows? Answer Tested on WinXP, Python 2.6 (3.x also tested) after installing pywin32 (pywin32-214.win32-py2.6.exe in my case):