During my experiment, participants have to click mouse left button and drag circles while holding button but I have a problem: When I try to drag a circle, cursor speed is much more than stimulus speed and during dragging stimulus stop to follow cursor even though mouse button still clicked. I’ve uploaded a video in order to make clear my problem. I would be grateful for any advice.
PS: There is an invisible circle, that’s the reason of wierd situation (Circle B cannot move left) of Circle B begining 00:13. Please ignore it.
This one is an interesting one. I also replicated the issue you describe in the drag and drop demo in builder view, but only when I moved the mouse very quickly. I think a possible solution could be to play with the custom mouse component (https://www.psychopy.org/api/visual/custommouse.html) and set it so that it is rendered at the same time as the stimulus being dragged - can I check have you tried something like this already?
Unfortunatelly custommouse is out of my league. I tried it but couldn’t understand how to use especially I need to you mouse functions such as isPressedIn etc. Meanwhile, I’ve tried a few different way after custommouse failure in order to cope with this problem but always there was dead end.
Today, I learned a new thing about Psychopy. I’ve just checked the demos in builder page. I’ll try a bit on this issue again. Thank you. I’ll inform you from new situations. I hope I’ll cope with this.
Meanwhile I’ll be appriciated if somebody help about my problem =)
The code in the example that Jan provided is explained here:
In essence, the mouse can move further than the boundary of your stimulus within one screen refresh, so it isn’t reliable to keep testing if the mouse is pressed within the stimulus. Instead, after the first time the mouse is pressed within a stimulus, you set a flag to indicate that a drag is under way, and just keep updating the stimulus position to match the mouse, until the mouse button is released.