| Reference | Downloads | Github

Frame updating with polygons

Hi all,

URL of experiment:

Description of the problem:

I am trying to devise a task in which participants have to reproduce a disk by dragging with the mouse (Final aim is to test variants of the Ebbinghaus illusion). Things work, with one very annoying glitch that I fail to understand : on each trial, at the beginning of the response routine, the response polygon flashes briefly, with the size of the response of the previous trial. This is despite the size to be reset at the end of the trial, and re-computed at each frame as a function of mouse position.
I does only occur when the response polygon size is set to change at each frame.

I am on Mac OS Catalina - Psychopy 2020.1.3 - same behavior on Chrome and Firefox.

I am breaking my head on this, and it is becoming urgent for a student thesis. Please help if possible - many thanks in advance.


Hi @alain, you can fix this by setting the polygon size to zero before the trial starts. That way, even though the polygon may be drawn, it is too small to be presented. In your “trial” routine, add the following to the “Begin Routine” tab of the “setResponse” code component:


response.size = [0, 0]
response._needVertexUpdate = True

and if you do not have autotranslate…


response.size = [0, 0];
response._needVertexUpdate = true;

So so so grateful, David ! Thanks very much !