-3

I found this cool site which has this very smooth cursor following code. How can this be implemented into c# winforms? The gif of the site

I saw sites on stackoverflow about this but they don't seem to be working. Please help out

Potatox
  • 3
  • 4
  • Can you elaborate on how your code "doesn't work"? What were you expecting, and what actually happened? If you got an exception/error, post the line it occurred on and the exception/error details which can be done with a [mre]. Please [edit] your question to add these details into it or we may not be able to help. – gunr2171 Oct 31 '21 at 04:53
  • Once you know the position of your cursor you can work on drawing a circle some small distance away from the center of the screen, along the line towards where the cursor is, from the center. If you don't want to get into drawing stuff yourself maybe just put an image in a picture box then move the picture box around. After you've got it moving look at making the movement gradual – Caius Jard Oct 31 '21 at 05:58

1 Answers1

0

If you use a center point (the center of the eye), then your screen is delimited in four zones.
Just use Math.acos with the x pos of your cursor position relative to your center point and you get the angle your eye needs to look at.

Overview

  • 1
    I'll refrain from casting votes, but this is like, at best 1/4 of the answer the OP is looking for. It's not clear yet what they've attempted, or if they know how to get the mouse's position or make this "eye" and move it around. – gunr2171 Oct 31 '21 at 05:02