• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to have a symbol follow the mouse cursor

Community Beginner ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

Lets say I have a simple circle that I have converted to a symbol. How would I make it so that its location is where the mouse cursor is like in this animation:

https://editor.p5js.org/JWNimble/sketches/_nJzDc4Kj

Views

144

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

If you are doing an HTML5 Canvas project, looking at this page should help you to do various mouse related functions. The click and drag example on that page will be close to what you want:

 

https://createjs.com/tutorials/Mouse%20Interaction/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

I figured it out, but that only works with shapes not symbols.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

LATEST

again, please don't open duplicate threads.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines