UNPKG

pxt-common-packages

Version:
24 lines (15 loc) 451 B
# camera Shake Shake the camera view to create a shock effect. ```sig scene.cameraShake(4, 1000) ``` ## Parameters * **amplitude**: a [number](/types/number) maximum offset the camera will move. * **duration**: a [number](/types/number) duration in milli-seconds ## Example #example Shake the camera view for 1 second. ```blocks scene.cameraShake(4, 1000) ``` ## See also #seealso [camera follow sprite](/reference/scene/camera-follow-sprite)