StaticBody3D input_event signal only firing once

Godot Version

v4.1.1.stable.official [bd6af8e0e]

Question

I have a very simple scene:

with a very simple script:

extends Node3D

func _on_static_body_3d_input_event(camera, event, position, normal, shape_idx):
	print(event)

When I run this scene and click on the cube, I get a single input event - the InputEventMouseMotion that you can see in the screenshots console. When I click on the cube I get nothing and when I mouseout and re-hover the cube I get nothing. Like the signal gets called once and then de-allocates itself. I have triple checked and I do not have ‘one shot’ enabled on the signal connection.

Is this correct behaviour? What is the correct way to handle click events on a scene?

When I use the unhandled input function, if I have multiples of this simple cube scene in a parent scene, the click event works but it gets fired for each cube in the parent scene, not just the cube that was clicked on. I swear I had this working just a week ago, might be having a brain fart. What am I missing?

Figured it out. I have an autoload scene which is game UI and the base node in that scene is a Control node which had the mouse filter mode set to stop. I changed that to ignore and now the mouse events work as normal. Weird that even that first mouse event got through…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.