camera follow lag
Problem it solves
You want your camera to follow the player smoothly with cinematic easing rather than snapping rigidly to their center.
What this block does
Updates the scene camera on every frame to smoothly interpolate toward the target sprite position with configurable lag.
The block
Block ID: retro_camera_follow_lag
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| sprite | Sprite | Player | The sprite the camera should track. |
| lag | number | 4 | Smoothing divisor (higher numbers make the camera slower and floatier). |
Example
let hero = sprites.create(img`.`, SpriteKind.Player) Retro.cameraFollowLag(hero, 6)
Add the extension
Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.