How to distort mouse trajectory?

I am struggling finding information about mouse rotation options… hoping that it’s possible!

What I am aiming to do is to rotate the direction of the cursor on the screen (with different degrees conditions) compared to the direction the participant is doing with the mouse.

Here a visual help to better understand:
To make it “easy”, even if the person moves straight, I want the cursor to move with a certain anlge rotation so that the person needs to change its movement to reach the target.

I am using PsychoPy v2021.2.3 on Win10.

Someona can help? Many thanks

I’ve done this previously where I hid the real mouse cursor and used the mouse to control an image of a fake cursor.

This experiment file is from 2017 so it may need some work.

mouse_tracking.psyexp (29.1 KB)

1 Like

@wakecarter thanks a lot!
However, I tried to use the code by adapting it but it’s not really clear to me the all procedure and, consequently, I don’t really kow how to make it work.
Could you give me some more details,
Thanks in advance!

I’ve just updated the code so it can run online, and added it to my online demos

Mouse Tracking code | try it | discussion thread

Originally written in 2017, this demo is a game where the object is to destroy targets using the mouse, where the mouse control has been rotated.

I’ve added some comments and made some components clearer.

The key is that there are two mouse locations – the real one (which is invisible) and the visible one. I therefore need objects (polygon targets) at both locations. When the participants thinks they are clicking on the visible target, in reality their invisible mouse cursor is clicking on the invisible target.

1 Like