-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

2
  • 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 minimal reproducible example. Please edit your question to add these details into it or we may not be able to help. Commented Oct 31, 2021 at 4: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 Commented Oct 31, 2021 at 5:58

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.