0 votes

I'm making a drag and drop game, but when the object enters the destination position, it is still movable if I don't release the mouse click. Is there a way do "unclick" the object?

asked Jul 22, 2019 in Engine by Itossaur (14 points)

Could you provide a code snippet of what you have so far? And what do you mean by "if I don't release the mouse click"? Is the object supposed to exit draggable state once it moves into the designated area?

1 Answer

0 votes

Are you looking for Input.is_action_just_released( "click" )

var clicked = false

if input.is_action_just_released( "click" ):
    clicked = !clicked

if clicked:
    "button pressed"
    "button unpressed"
answered Jul 24, 2019 by usurun (322 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.