Hi all,
The following code used to work perfectly in Godot 2.1 but I can't seem to find the alternative way to do it in Godot 3.x:
extends RigidBody
#-------------------------------------------------------------
func _ready():
# Called every time the node is added to the scene.
# Initialization here
set_process(true)
pass
#-------------------------------------------------------------
func _input_event(camera, event, pos, normal, shape):
if (event.type==InputEvent.MOUSE_BUTTON and event.pressed):
print("Object touched !")
pass
#-------------------------------------------------------------
In both case the rigid object has a mesh and collision shape as child.
PS: I don't want to detect a generic touch screen event but exactly when this mesh is touched.
Thx in advance.