0 votes

hi guys , how to keep my mouse position at same place when i click and drag it?
for example if i drag Node2D with child( texture_rect.size(128,128)), i want my mouse stay at position first it click. for now my mouse either move to (0,0) or center of object. how should i do it?. can give me example.

in Engine by (384 points)
edited by

1 Answer

0 votes

Maybe you can set the child nodes to Pass/Ignore the mouse events in the Mouse->Filter property in the Inspector? Otherwise you would need to set up an input event capture function to reset the position of the main node to that of the mouse.

by (189 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.