center camera view
Problem it solves
You want a mini-camera window to look at a stationary point on the map, like a locked treasure chest or dungeon exit.
What this block does
Centers the viewport of a camera view sprite at fixed (x, y) coordinates in the world.
The block
Block ID: splitscreen_centerCameraViewAt
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| cameraView | Sprite | myCameraView | The camera view sprite to position |
| x | number | 0 | The horizontal pixel position in the game world |
| y | number | 0 | The vertical pixel position in the game world |
Example
let miniCam = splitScreen.createCameraView(40, 30) splitScreen.centerCameraViewAt(miniCam, 100, 100)
Add the extension
Add github:riknoll/arcade-split-screen to your project, or open: Import arcade-split-screen.