drawing a line segment in real-time to match cursor position #2714
Unanswered
baltimore77
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I've been working on recreating an experiment (currently in Matlab) which needs to fit into an ongoing multi-site study, in which the host site for the various experimental tasks to be administered requests the tasks be written in jsPsych v6.
The task I've struggled to make is a verison of an rdk (random dot kinetogram).
Briefly, in a traditional rdk, dots flow randomly across a small aperture or window in the middle of the screen while some small percentage of these dots (eg, 30%) flow in a coherent direction, either left or right. In this traditional rdk, participants try to pick out the coherent motion within the random noise, and respond 'left' or 'right' to indicate the direction of flow of the coherently moving dots.
In the version I'm trying to make, the coherent dots can flow in any direction, and participants don't merely respond 'left' or 'right', but instead need to precisely indicate with the mouse where the dots were flowing (eg, towards 2 o'clock on a clockface). When the participant moves their mouse to respond, a line segment should appear, one endpoint locked to screen center, the other endpoint locked to the perimeter of the aperture in which the rdk dots appeared. If the coherent dots were headed towards the upper right portion of the screen (say, 2 o'clock), participants would swing the mouse towards the upper right of the screen, and in so doing adjust the angle of the line until it was angled the same as their recollection of the coherent dots. When the angle of the line matches their recollection of the dots, they click the mouse to register their response and initiate the next trial.
In the version of jsPsych I'm using, I do have access to an rdk plugin (thank goodness), but I don't have access to a plugin which would help with the response portion of the trial, as far as I can tell.
Advice on how to continuously draw the response line according to current cursor position, until mouse-click?
Beta Was this translation helpful? Give feedback.
All reactions