center camera
Problem it solves
You want a split-screen camera to lock onto a fixed map location, like an overview of a maze or a boss room, instead of tracking a player.
What this block does
Centers a chosen split-screen camera at specific X and Y map pixel coordinates and detaches it from any sprite.
The block
Block ID: splitscreencentercameraat
center camera $camera at x $x y $y
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| camera | Camera | The camera slot to reposition. | |
| x | number | The horizontal pixel position on the map to center the camera on. | |
| y | number | The vertical pixel position on the map to center the camera on. |
Example
splitScreen.centerCameraAt(splitScreen.Camera.Camera1, 80, 60)
Add the extension
Add github:riknoll/arcade-split-screen to your project, or open: Import arcade-split-screen.