Lock mouse but keep cursor visible,Lock mouse but keep cursor visible.. how do I do this?
Hi,
I'm working on the game mechanics of a first-person adventure game. What I want to achieve is something like this:
cursor is locked in middle with a default icon
cursor hovers item in scene which is interactable, cursor changes to flashing cursor
cursor returns to default when leaving
Locking the cursor was easy, by setting the lockState to "Locked". But this always hides the cursor regardless of the "visible" property. Changing state when an item is hovered was also very easy, I'm just using a collider on the object and using the MouseEnter and MouseExit events.
However, how do I work around the issue of the cursor not being visible? Is there another way to keep my mouse centered while displaying the cursor? Or should I create a HUD and "fake" a cursor by putting an icon on the centre?
What is accepted "best practice" for this scenario?
Your answer
