center camera view
Problem it solves
You want a picture-in-picture camera view sprite to stay locked onto a specific location, like a key or exit door.
What this block does
Repositions a standalone camera view sprite to look at fixed world X and Y coordinates.
The block
Block ID: splitscreen_centerCameraViewAt
center camera view $cameraView at x $x y $y
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| cameraView | Sprite | myCameraView | The camera view sprite to reposition. |
| x | number | The X coordinate in world pixels to focus on. | |
| y | number | The Y coordinate in world pixels to focus on. |
Example
let view = splitScreen.createCameraView(60, 60) splitScreen.centerCameraViewAt(view, 200, 150)
Add the extension
Add github:riknoll/arcade-split-screen to your project, or open: Import arcade-split-screen.