# Area2D A trigger zone that fires body_entered / body_exited. ```{raw} html ▶ Run in browser ``` **Tags:** `2d` `physics` `area` `trigger` `signals` A PhysicsBody2D shuttles left and right across the screen and repeatedly passes through a stationary Area2D sensor. The Area2D emits body_entered when the walker overlaps it and body_exited when it leaves; the demo recolours the zone while occupied and counts total entries. ## What it demonstrates - Area2D as a broadphase sensor zone with a CollisionShape2D child (rectangle). - Connecting to the body_entered / body_exited signals (payload is the body). - A PhysicsBody2D inside a PhysicsRoot2D driven by velocity each fixed step. - Reacting to overlap state: recolour the zone, count entries, live HUD. Controls: ESC - Quit ## Source ```{literalinclude} ../../examples/features/2d/area2d.py :language: python :linenos: ```