Godot Version
`4.3’
Question
So basically i use a _on_click_signal_input_event() function to detect whether the mouse was clicking on an object3d or not, and after i left-click on the object, it should be removed. However, this does not work as expected and the object isn’t picking up my clicks. Could anyone help
extends RigidBody3D
@onready var ball = $“SphereBody/Sphere Body”
@onready var particle = $SphereBody/GPUParticles3D
@onready var sfx = $SphereBody/AudioStreamPlayer3D
@onready var collisionbody3d = $SphereBody/CollisionShapeSphere
func _ready():
Level.objectcount += 1
func _on_click_signal_input_event(camera: Node, event: InputEvent, event_position: Vector3, normal: Vector3, shape_idx: int) → void:
if InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_LEFT && event.pressed:
queue_free()