Manually rotate image around center using the mouse

Hi all. Thank you for all the help the past month or so. I’m still so bad at coding so any help is appreciated…

Is it possible to “grab” a stimulus and rotate it using the mouse? So far I have been able to click on the stimulus which triggers a rotation. But, what I would like to do is have participants move the mouse, say, clockwise and the stimulus will rotate in that direction? Much like how we rotate images on MS Powerpoint or Word.

I haven’t tried coding anything as I am unsure where to look.

Thank you for any advice!

Hi,

check this forum post: Re-drawing a line updating its orientation as mouse movement

I think that the same solution could be implemented in your case with some modifications.

1 Like

Thank you! I was looking at that thread last night but wasn’t sure… I’ll test it out.