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")]
[PlatformerHelpUrl(typeof(CameraShake))]
public 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 | |
Platformer |
[Assert-Conditional]
A UnityEngine.HelpURLAttribute which points to Platformer Game Kit's documentation.
|
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 |
Methods
Name | Value | Summary |
---|---|---|
Awake |
void | |
LateUpdate |
void | |
OnValidate |
void |
[Editor-Only] Ensures that all fields have valid values and finds missing components nearby.
|