[Solved] Custom cursor in incorrect postion when following the camera

What is the expected result

I want my custom cursor object to follow my mouse and its position and also function and interacts with static Ui

What is the actual result

The cursor appeared to be following my mouse, but the actual position changed and offset according to my player’s position because I linked the camera to my player

Related screenshots

image
(The red circle is an object that follows the custom cursor’s X and Y position, it is supposed to be on the yellow circle, but it offsets as my character moves)

(I used lerp to lerp the camera onto my player)

image

(I checked the cursor using the debugger and it is indeed on the “Mouse” layer)

You should not move the “Mouse” layer.

I stopped the “Mouse” Layer from lerping, the object that is supposed to follow my custom curser still offsets

This looks like you have different zoom level on each layer

I never changed zoom level in my code

Thank you, It just magically worked now after I tweaked around the code and layers, even though I had no idea why it wasn’t working before.