Topic was automatically imported from the old Question2Answer platform.
Asked By
Qws
Old Version
Published before Godot 3 was released.
At this moment I’ve a character scene that is a KinematicBody2D, which contains no direct sprite node. But it does have an instance of an external Area2D child node which contains also a sprite child node. So indirectly the KinematicBody2D has an Area2D node + Sprite Node.
Because I want to use the “Enter_Body” event whenever 2 sprite nodes are colliding.
Why this complicated structure? Why not just this:
PhysicsBody2D / Area2D
CollisionShape2D Sprite
Set up to of these and then connect the signal body_entered to the node where you want to call the function. The same works with 2 PhysicsBody2Ds aswell. Area2D is best used as a field, which detects collision, but won’t physically interact.
Only area2D emits the signal “body entered” so the structure you offer does not work without area2D.