- Home /
Mouse delta at the edges of screen
Hi!
I'm trying to detect how much the player has pushed the mouse toward the edge of the screen. Basically, I need the distance that the mouse moved while the cursor is already at the edge of the screen but Unity doesn't have any position delta for mouse cursor. Is there any way that you can think of?
Input.mousePosition won't work because the cursor is not moving at this point and just staying at the edges of the screen while the physical mouse is being moved.
Answer by toddisarockstar · Feb 04, 2019 at 10:10 PM
// try using this:
Input.GetAxis("Mouse X");
Input.GetAxis("Mouse Y");
Your answer
Follow this Question
Related Questions
Smooth animation scrubbing with the mouse 3 Answers
Moving Rigidbody2D relative to the mouse. 1 Answer
camera.ScreenToWorldPoint() question 1 Answer
Rotation of Object on single axis in direction of the mouse position 0 Answers
Add force towards input.mouseposition position not working as expected 2 Answers