-
Notifications
You must be signed in to change notification settings - Fork 0
ShakeByDistanceData
S. Lucas Serrano edited this page Dec 6, 2022
·
15 revisions
struct
namespace: none
Info used by the AddShakeByDistance() function of the CameraShaker.
You can add a public instance of ShakeByDistanceData or add the attribute [SerializeField] to any of your Monobehaviour to make it editable from the inspector.
| Property | Description |
|---|---|
| Min Distance | Min distance to have in count. |
| Max Distance | Max distance to have in count. |
| Min Magnitude | Shake magnitude added at Max Distance or more. |
| Max Magnitude | Shake magnitude added at Min Distance or less. |
| Falloff Curve | Curve that defines how the shake is reduce by the distance. Is expected to go from (0,1) to (1,0). The X axis is distance (0 = minDis and 1 = maxDis). The Y axis is magnitude (0 = minShake and 1 = maxShake). |
| Property | Type | Description |
|---|---|---|
| minDistance | float |
Min distance to have in count. |
| maxDistance | float |
Max distance to have in count. |
| minMagnitude | float |
Shake magnitude added at Min Distance or less. Must be between 0 and 1. |
| maxMagnitude | float |
Shake magnitude added at Max Distance or more. Must be between 0 and 1. |
| falloffCurve | AnimationCurve |
Curve that defines how the shake is reduced by the distance. |