[Solved] Problem with custom cursor following mouse in different layer

Hello I have a problem with my custom cursor
On my screen I have a player object that the camera follows it, the player is on Base layer
Next I have my custom cursor on a layer named “Cursor”

What I want to do is to make my cursor follow my mouse on any layer but now it will follow my mouse perfectly only when I put it on Base layer but when I move it to “Cursor” layer the cursor doesn’t work well

Here is the link when I put my cursor on Base layer

Here is the link when I move cursor to “Cursor” layer

Here is my layer and code


Also when the cursor is on Cursor layer and the player moves the cursor seems to be moving too which is not what I want, but when the cursor is on base layer it doesn’t move when the player move

In that last event, modify the mouse cursor position to specify the layer and camera the cursor object is on, so it becomes MouseX(“Cursor”, 0) and MouseY(“Cursor”, 0).

4 Likes

It works, Thank you, Thank you !! :grin: :innocent: