- Home /
Move cursor from script (mouse.current or alternatives?)
Hello everyone,
I am testing alternative input methods like controllers or a spacemouse. However my application was build for a mouse or touch event to select things/navigate menus etc. Now I am searching for a solution on how to move the cursor e.g. with a joystick.
I was wondering how best to implement this feature? I tried what was suggested here https://forum.unity.com/threads/moving-the-mouse-cursor-with-the-gamepad-joystick.900563/ however Mouse.current did throw the error "The name 'Mouse' does not exist in the current context'" for me.
Also I found I can print the current cursor position with Input.mousePosition. However as this is read-only it apparently cannot be used for my use case?
As the question was quite old, I was unsure whether I am doing something wrong or if there is a better way to do it nowadays? Thanks in Advance!
Your answer
Follow this Question
Related Questions
Fps Rigidbody controller with mouse cursor? 0 Answers
Making a torque-based sphere controller by simple mouse inputs 2 Answers
Cursor Disappears In Scene View When Play Mode Is On 2 Answers
Game runs on one screen, cursor wanders onto other screens? 0 Answers
Use OnMouseEnter/OnMouse Exit with center of screen 1 Answer