Godot Version
4.2.2
Question
I want to make it so when a RigidBody3D enters an Area3D, it prints a message. However, I cannot connect Area3D to RigidBodt3D. What do I do to connect them?
4.2.2
I want to make it so when a RigidBody3D enters an Area3D, it prints a message. However, I cannot connect Area3D to RigidBodt3D. What do I do to connect them?
Inside the Area3D script,
func _ready():
connect("body_entered", on_body_entered)
//You can replace on_body_entered with any name of your choice
Now create an on_body_entered() function
func on_body_entered(body):
print_debug("message")
In case you want to do this for a specific node only,
func on_body_entered(body):
if body.name == NodeName
print_debug("message")