godot-psd-training/sceen/platform/screenDoorArea3D.gd
2024-04-30 16:02:08 +08:00

6 lines
295 B
GDScript

extends Area3D
func _on_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_RIGHT:
$"..".clicksScreenDoorSignal.emit($"..",event.global_position)