1

I am looking to find help with setting up some code to make an element box's bottom side always face the cursor. I am building a simple 3 stage top down shooter as part of a small portfolio project. My partner has us using Hype 3 and so I cannot take advantage of the HTML Canvas.

Is there a way to do this using plain javascript or jquery?

Sanyami Vaidya
  • 799
  • 4
  • 21
Zeryphim
  • 13
  • 3

1 Answers1

0

Yes, check mouse position, then check your block position, and do some simple trigonometry to calculate angle.

Community
  • 1
  • 1
Mik
  • 124
  • 8