Replies: 1 comment
-
I am not sure about the mouseCoord being undefined here, setting a value in onStageStart and seeing on the client side is a pretty fundamental feature that should just works, but your exact situation might be different then what I am imagining. If you wouldn't mind, please create a ticket for that with all the code details of your situation, and feel free to share with me the code in DM on Slack if you want me to take a closer look. As for the mouse tracking, the last release added what I'm calling Check out the release notes to learn how to use ephemeral attributes. I'll post here my answer about mouse tracking in Slack for future reference, for anyone else wanting to do this:
|
Beta Was this translation helpful? Give feedback.
-
I am interested in writing up an experiment where there will only be 2 players. At one stage, I want each player to view the mouse of the other player in real-time. If this becomes intractable, it would also suffice to show which region the other player's mouse is currently in (out of 36 regions on the screen). What I am currently doing is in the callback.js file, I added in Empirica.onStageStart for (const player of players) {
player.set('mouseCoord', [x, y])
} and do partner.get('mouseCoord') in the stage file. However, this value is undefined when I test it on local host.
Beta Was this translation helpful? Give feedback.
All reactions