I am relatively new to coding with Python/PsychoPy. I wrote a code that makes use of the visual.CustomMouse class because it has the ability to restrict the movement of the mouse to a certain area (in my case I need to restrict mosue movement to vertical movement so no change in X axis). The issue is however that visual.CustomMouse does not support the setPos() function (as stated on the psychopy website isteslf) and whenever I try I recieve the error:
“setPos() takes exactely 2 arguments (3 given)”
for mouse.setPos(0,-22). Considering this is a major drawback of this class I was wondering if there is a workaround for this (I could not find one so far).
Alternatively, is there a way to use the regular event.Mouse class (as it supports SetPos()) and restrict its movement some other way ?
I use psychopy libraries in Python 2.7 (Spyder3) on a Win7 (64bit) system. I use a ‘pygame’ window if that helps.
Thank you !