From b501ee869d67497e82933ea68cd37b23284ba5bd Mon Sep 17 00:00:00 2001 From: Sajidur Rahman Date: Sat, 14 Sep 2024 02:14:07 +0600 Subject: [PATCH] get_tree().set_input_as_handled() is not available in blender 4x get_tree().set_input_as_handled() is not available in blender 4x and has been moved to viewport. Should use get_viewport().set_input_as_handled() --- src-4/content/input/mouse_capture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-4/content/input/mouse_capture.md b/src-4/content/input/mouse_capture.md index 7e4ff119..1c24050f 100644 --- a/src-4/content/input/mouse_capture.md +++ b/src-4/content/input/mouse_capture.md @@ -53,5 +53,5 @@ Once the mouse is released, that leaves the need to re-capture it to continue pl Since you may also be using a mouse click to shoot or perform some other action, it's probably a good idea to stop the event from propagating. Add this after setting the mouse mode: ```gdscript -get_tree().set_input_as_handled() +get_viewport().set_input_as_handled() ```