- Home /
How do I send my cursor to a sprite 2D
Crucial info:
I have a hexagon grid in unity
I have a circle sprite acting as a mouse
There are 2 "modes" my mouse has access to, im gonna call my circle cursor sprite "cursor" and the default windows cursor ("mouse")
im new to unity and code in general
1 of the "modes" acts as the mouse usually does "freeM"
the 2nd snaps to the grid "SnapM"
The freeM is smooth, the problem comes from trying to go from snapM to freeM.
since the cursor is snapping and the mouse isnt,
once it transitions back to freeM the cursor is far from the original position.
Essentially what i want to do to fix this is to send my mouse to the cursor(which is where the player thinks the mouse is) after every transition
How do i do this? i cant figure it out
Answer by bluethunder3991 · Jan 23 at 07:42 AM
Check out this answer and the answer mentioned in it as well. https://answers.unity.com/questions/441744/move-mouse-to-a-position-on-screen.html