Skip to reading
GDScript Programming & Godot

ShakeScreen()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Shake Screen

Start the extension's screen-shake effect with horizontal, vertical or combined movement.

Source table from ShakeScreen(), page 142
Option key / fieldMeaning and inputDefault
Direction directionChoose: both, horizontal, vertical."both"
Duration (seconds) durationTime in seconds for this action. Read its timing note before assuming it waits. Range: 0 to 60.0.5
Power (pixels) powerNumber; decimals allowed. Range: 0 to 1000.8

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await ShakeScreen({"direction": "both", "duration": 1, "power": 8})

In use. Use a modest screen shake when a heavy mechanism locks into place. This is a different effect route and strength scale from Camera Shake. Use Stop Screen Shake to cancel an ongoing screen effect.

StopScreenShake()#

Stop Screen Shake

Stop the current extension-driven screen shake.

No options in the standard catalog schema.

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await StopScreenShake({})

In use. Call it if a shake is interrupted by a menu or a scene change. It does not select a camera or undo a separately running camera orbit.

Page 142 of 378Permalink
Go to page