How to Check for Mouse Button Release?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mimimomo

Is there an InputEvent for releasing a left mouse button click? Is there a more direct solution for my code?

Current solution:
“click” is set in the Input Map as a left mouse button click.

func _on_input_event(viewport, event, shape_idx):
    if (event is InputEventMouseButton && event.is_action_released("click"):
    		# code


:bust_in_silhouette: Reply From: Christoffer
func _process(delta):
if Input.is_action_just_released("click"):
	print("Left mouse button released.")
1 Like

next IF - don t work !

func _process(delta):

if Input.is_action_just_released("click"):

if Input.is_action_just_pressed("click"):  # here don t work ! Only first input

	inst(get_global_mouse_position())> Blockquote