Summary
A system for shaking the camera.
- Assembly
- PlatformerGameKit
.dll - Namespace
- PlatformerGameKit
- Base Types
-
- MonoBehaviour
graph BT
Type-->Base0["MonoBehaviour"]
Type["CameraShake"]
class Type type-node
Syntax
[AddComponentMenu(Strings.MenuPrefix + "Camera Shake")]
[HelpURL(Strings.APIDocumentation + "/" + nameof(CameraShake))]
public sealed class CameraShake : MonoBehaviour
Remarks
The techniques used in this script are based on a GDC talk:
Math for Game Programmers: Juicing Your Cameras With Math.
Documentation: Camera Shake
Attributes
Type | Description |
---|---|
AddComponentMenu | |
HelpURLAttribute |
Properties
Name | Value | Summary |
---|---|---|
Damping | float | |
Frequency | float | |
Instance | CameraShake |
The currently active
PlatformerGameKit.CameraShake instance.static
|
Magnitude | float |
The current normalized strength of the camera shake (
0 = none, 1 = full). |
MagnitudeExponent | float | |
PositionStrength | Vector3 | |
RotationStrength | Vector3 |