how can Area 2D detects a CollisionShape2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ManiCus

how can Area 2D detects a CollisionShape2D

:bust_in_silhouette: Reply From: kidscancode

You don’t detect shapes, you detect collision objects. CollisionShape2D gives a shape to a CollisionObject2D.

Area2D can detect overlap with other areas, and it can detect PhysicsBody2D objects, which are RigidBody2D, StaticBody2D, and KinematicBody2D.

See Physics Introduction in the docs for a complete explanation.

Unless you mean when an object has multiple shapes assigned. In that case, you can use body_shape_entered or area_shape_entered to see which one it was on the colliding object.