You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
104
104
[codeblocks]
105
105
[gdscript]
106
106
# Prevents the InputEvent to reach other Editor classes.
107
-
func _forward_3d_gui_input(camera, event):
108
-
return true
107
+
func _forward_spatial_gui_input(camera, event):
108
+
return EditorPlugin.AFTER_GUI_INPUT_STOP
109
109
[/gdscript]
110
110
[csharp]
111
111
// Prevents the InputEvent to reach other Editor classes.
112
112
public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
113
113
{
114
-
return true;
114
+
return EditorPlugin.AFTER_GUI_INPUT_STOP;
115
115
}
116
116
[/csharp]
117
117
[/codeblocks]
@@ -185,8 +185,8 @@
185
185
Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
186
186
[codeblocks]
187
187
[gdscript]
188
-
# Prevents the InputEvent to reach other Editor classes
189
-
func _forward_canvas_gui_input(event):
188
+
# Prevents the InputEvent to reach other Editor classes.
189
+
func _forward_spatial_gui_input(camera, event):
190
190
return true
191
191
[/gdscript]
192
192
[csharp]
@@ -202,13 +202,19 @@
202
202
[gdscript]
203
203
# Consumes InputEventMouseMotion and forwards other InputEvent types.
204
204
func _forward_canvas_gui_input(event):
205
-
return event is InputEventMouseMotion
205
+
if (event is InputEventMouseMotion) {
206
+
return true
207
+
}
208
+
return false
206
209
[/gdscript]
207
210
[csharp]
208
211
// Consumes InputEventMouseMotion and forwards other InputEvent types.
209
212
public override bool ForwardCanvasGuiInput(InputEvent @event)
Copy file name to clipboardExpand all lines: doc/classes/Node3D.xml
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -212,6 +212,15 @@
212
212
Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default, unless it is in the editor context and it has a valid gizmo.
0 commit comments