# Camera2D follow a target with smoothing, zoom, and edge limits. ```{raw} html ▶ Run in browser ``` **Tags:** `2d` `camera` Add a `Camera2D` and point its `target` at a node; the view then follows that node. `smoothing` adds lag so the camera eases after the player instead of snapping, `zoom` scales the view, and the `limit_*` properties stop the camera from showing past the edges of your world. Move the cube with WASD or the arrows and watch the grid scroll underneath it while the cube stays near the centre. ## What it demonstrates - `Camera2D` + `camera.target = node` -- the renderer tracks the target's position. - `smoothing` -- ease toward the target instead of snapping (0 = instant). - `zoom` -- scale the whole view. - `limit_left/right/top/bottom` -- clamp the camera so it never shows past the world edges. - World-space drawing (the grid, camera-affected) vs a screen-fixed HUD (a `Text2D` node). ## Source ```{literalinclude} ../../examples/features/2d/camera.py :language: python :linenos: ```