From ef84289674dd7cacc9d083c61440bc4bc71b6824 Mon Sep 17 00:00:00 2001 From: Christopher Mahn <56981804+c-mahn@users.noreply.github.com> Date: Sat, 14 Jun 2025 15:04:45 +0200 Subject: [PATCH] Added new Signal to Function Pointer This commit adds a new signal to the Function Pointer, that reports back, if the FunctionPointer is interacting with something like a menu. --- addons/godot-xr-tools/functions/function_pointer.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/godot-xr-tools/functions/function_pointer.gd b/addons/godot-xr-tools/functions/function_pointer.gd index 536eb097..2226e5c9 100644 --- a/addons/godot-xr-tools/functions/function_pointer.gd +++ b/addons/godot-xr-tools/functions/function_pointer.gd @@ -17,6 +17,8 @@ extends Node3D ## Signal emitted when this object points at another object signal pointing_event(event) +signal is_interacting(interacting: bool) + ## Enumeration of laser show modes enum LaserShow { @@ -217,6 +219,7 @@ func _process(_delta): if new_target and not last_target: # Pointer entered new_target XRToolsPointerEvent.entered(self, new_target, new_at) + is_interacting.emit(true) # Pointer moved on new_target for the first time XRToolsPointerEvent.moved(self, new_target, new_at, new_at) @@ -226,6 +229,7 @@ func _process(_delta): elif not new_target and last_target: # Pointer exited last_target XRToolsPointerEvent.exited(self, last_target, last_collided_at) + is_interacting.emit(false) # Update visible artifacts for miss _visible_miss()