readCameraShakeScale
readCameraShakeScale(
playerSettings,deviceReducedMotion?):number
The share of a game’s camera shake the player sees: the player’s Screen
shake setting, and none while motion is reduced, by the player’s Reduced
motion row or, where the player left it to the device, by the device’s
own setting. The Xbox accessibility guidelines ask for a way to turn
shake off, and WCAG’s guidance on motion from interaction points to the
device’s setting. shakeCamera applies it; a game that moves its view
its own way for a hit multiplies by it:
readCameraShakeScale(useSettings.getState()).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
playerSettings |
Pick<PlayerSettings, "cameraShake" | "reducedMotion"> |
deviceReducedMotion |
boolean |
Returns
Section titled “Returns”number