Problem with my area2D

Godot Version

4.6

Question

Why dos this not work.

The signal comes from the same area it is conectet to.

i get 0 print massages in my cosol.

i want to print out “winn” when my ball (a riged body with sprite 2D and collider)

enters this area i have no idea why this is not working i got the script from a youtube video.

extends Area2D


func _on_body_entered(body: Node2D) -> void:
	print("LOL")
	if (body.name == "ball"):
		print ("winn")

What about the “LOL” message? Does it appear?

Nope as i sad 0 print,s

the body enters the area to 1000%

Can you send me a screenshot of the scene tree where your Area2D is located?

This is a box with 3 collision shapes and a area inside

Make sure that the Area2D of the gate and the RigidBody of your ball have the same collision layer:

i dit teay are all set to 1

It now print for no reason.

i scaled up the area collider and replaced ball and box.

Thanks for help!