Gaze dependent task - where to start?

Hello all,

I am trying to create a task which requires the participant to fixate centrally throughout. I want the trial to restart if they move their eyes away from the central fixation point.

I’ve tried using the ROI function and can get it to end the routine if fixation is lost, but it doesn’t start up again - I am left with a blank screen for the rest of the experiment. Ideally it would only be blank until fixation is restored, then the trial would start again.

Is this possible to complete in Builder? And if not, how can I code this?

I’m currently using mouse gaze if that helps!

Thanks for reading!

Lucy

OS: Win 11
PsychoPy version: 2025.1.1
Standard Standalone Installation? Yes
Do you want it to also run online? No
What are you trying to achieve?: Ending a trial if fixation is lost, then restarting it when fixation is regained.

What did you try to make it work?: ROI tracking and mouse gaze, it would end the trial but not restart it.

Link to the most relevant existing thread you have found:

What specifically went wrong when you tried that?:
No error messages, but the stimulus would disappear (as expected) and then I would be left with a blank screen - the trial wouldn’t restart after fixation was resumed.

Hi @lstarling ,

What about something like the attached? I’ve just made a loop with 50 repeats, with an ROI over a central fixation cross that’s set to end the routine on ‘look away’. Then I’ve added a warning routine that tells the participant to look back at the fixation cross. That has an ROI that’s set to end the routine on ‘look at’.

Hope that helps to get you started!

Kim

fix_demo.psyexp (23.7 KB)

1 Like

Thanks for this demo! It is very similar to what I had already made, but with the addition of the ‘look at’ ROI as well. Unfortunately I can’t get it to work as intended on my computer - it doesn’t seem to ‘loop’, instead staying on the ’Please look back at the fixation cross’ screen indefinitely. Does it work as expected for you? Perhaps it is my computer which has the issue…

Hi @lstarling

It does work for me, but it could be an issue with the scaling settings on your monitor (described in this post).

In the attached demo, I’ve added a circle that should appear at the same location as your mouse cursor when you use MouseGaze - do those two line up? If not, I would recommend that you follow the instructions in the post linked above to make sure your screen scale settings are 100% rather than 125% (or anything else).

fix_demo (1).psyexp (29 KB)

All the best,

Kim

1 Like