Hello. I am using the Builder to create a task where in each trial 2 images side by side are shown. One of them is initially upside down and will rotate to its correct orientation on trial onset (ideally 2s after trial onset). The participant’s task is to report the direction of the rotation of the object using a keypress. I have two issues:
I have code that successfully rotates the target image on trial onset. Unfortunately, it only happens on the first trial. Subsequent trials do not rotate, nor are image positions randomized. I think the entire code component doesn’t carry over to the next routine.
Right now, the rotation is clockwise. How do I randomize this so that in some trials, the rotation is counterclockwise?
Hi Wakefield! Thank you so much for responding to my query. I added the codes and set the orientation to update every frame. When I run the task, I believe every trial is now updating, however, the direction is either clockwise or static. It does not rotate counterclockwise.
I tried changing the code in the Each Frame tab:
if abs(currentOri) < 180:
Image1P.ori + imDirection[0]
This resulted in Image1P rotating in every trial BUT only clockwise. :\
Begin Experiment
imDirection = [1,-1]
Begin Routine
shuffle(imDirection)
currentOri = 0
Each Frame
if abs(currentOri) < 180:
Image1P.ori + imDirection[0]
Update: Now even with “+=” in the Each Frame code, every trial rotates but only clockwise.