camera shake
Problem it solves
Player 1 gets hit or triggers an explosion, and you want only Player 1's split-screen view to shake without affecting Player 2's screen.
What this block does
Shakes a specific split-screen camera view by a specified pixel distance for a given duration in milliseconds.
The block
Block ID: splitscreencamerashake
camera $camera shake by $amplitude pixels for $duration ms
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| camera | Camera | The camera view to shake. | |
| amplitude | number | 4 | How many pixels wide the shake vibration is. |
| duration | number | 500 | How long the shake effect lasts in milliseconds. |
Example
splitScreen.cameraShake(splitScreen.Camera.Camera1, 5, 500)
Add the extension
Add github:riknoll/arcade-split-screen to your project, or open: Import arcade-split-screen.