Area2d doesn't detect CharacterBody2D, the two are scenes in another scene

Godot Version

4.5.1

Question

I have an scene as the Player with a CharacterBody2d an his collisionshape, and a Area2d also with collisionshape. The signal on_enter_body its conected to a function on a player but its not being called when collides with the player. What could be the problem?

Can you share your code? If even a simple print function doesn’t run inside of on body entered then it may not be connected.

The signal is connected to this function on the player
func _on_area_2d_body_entered(body: Node2D) → void:
print(“Icon enters”)

If this never prints then either the signal is not connected or you are not colliding with it. Can you share your scene tree, maybe share how you connected this function too?

Do you get any errors? Is your player on the same collision layer as the area’s collision mask?

There are no errors and the collision layer and collision mask are seted to one

I want to clarify that the player is a scene and has the collisionshape within it.

Have you tried playing with “Visible Collision Shapes” enabled in the debug menu?

Yep, and they look correctly. The print is never called :s

Try keyword breakpoint instead of print(), maybe the output panel has accidentally hidden print statements.

That was it, thank you very much.