Mouse global position is not correct

Godot Version

4.3

Question

I want to realize in my game moving the object like in photoshop but with limits. To make mouse stuck on node when press. As i understand thats a Input_warp_mouse function.

But my nodes are connected like

MainNode
└── MotherRoom
└── DragObject

And drag object have warp function. to local(get_global_mouse_position) is not correct. How to get a correct position of the mouse? Or i should make other script in main scene better?

Please paste your code in here as preformatted text

sounds like you are warping the mouse to the mouse’s position. This probably won’t result in any movement or locking.

Make sure to paste your scripts rather than screen shots