camera view property
Problem it solves
You need to know the world coordinates (like center X, center Y, or top edge) of what a camera view sprite is currently viewing.
What this block does
Reads a coordinate property (X, Y, Left, Right, Top, or Bottom) from a camera view sprite's view.
The block
Block ID: splitscreen_getCameraViewProperty
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| cameraView | Sprite | myCameraView | The camera view sprite to inspect |
| property | CameraProperty | CameraProperty.X | The coordinate property to get (X, Y, Left, Right, Top, or Bottom) |
Returns
number — The coordinate value of the requested property in the camera view.
Example
let miniCam = splitScreen.createCameraView(40, 30) let viewX = splitScreen.getCameraViewProperty(miniCam, CameraProperty.X) console.log(viewX)
Add the extension
Add github:riknoll/arcade-split-screen to your project, or open: Import arcade-split-screen.