camera property
Problem it solves
You need to know where a specific player's camera is looking in the tilemap to spawn items nearby or check boundaries.
What this block does
Gets a coordinate property (such as X, Y, Left, Right, Top, or Bottom) from a split-screen camera.
The block
Block ID: splitscreen_getCameraProperty
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| camera | Camera | Camera.Camera1 | Which camera to inspect |
| property | CameraProperty | CameraProperty.X | The coordinate property to read (X, Y, Left, Right, Top, or Bottom) |
Returns
number — The pixel position of the requested camera property.
Example
let camLeft = splitScreen.getCameraProperty(splitScreen.Camera.Camera1, CameraProperty.Left) console.log(camLeft)
Add the extension
Add github:riknoll/arcade-split-screen to your project, or open: Import arcade-split-screen.