Last day I was making a joystick handle that would follow the mouse when clicked. To get the local position of the mouse position relative to the joystick background node(which I had to for my algorithm to clamp the max distance the handle could go) I used background.transform.xforminv, but, unfortunately, it didn't work. So i tried using background.tolocal which,surprisingly, worked. Now my question is: Isn't node.transform.xforminv supposed to do the same as Node.tolocal? Or am I missing something?
Btw the Node architecture i was using was the following: Player(Node2D) ->TouchControls(Canvas Layer) -> Joystick(Area2D) -> Background(TouchScreenButton) -> Handle(Sprite)
Thanks in advance for any help in clarifying this question,