Topic was automatically imported from the old Question2Answer platform.
Asked By
ChewAllTheThings
Old Version
Published before Godot 3 was released.
I have my button scene as follows:
Sprite
Area2D
CollisionShape2D
Tween
Sample2D
In code, I am currently using the mouse_enter() and mouse_exit() signals to start different tweens. What I would like to do next is be able to click on my sprite. I tried using the input_event() under the CollisionObject2D but that seems to executes my print message as soon as my mouse enters the sprite’s area. I only want it to execute code after a mouse click. What should I do?