| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Camera/CameraShake.h |
Include |
#include "Camera/CameraShake.h" |
class UCameraShake : public UObject
A CameraShake is an asset that defines how to shake the camera in a particular way. CameraShakes can be authored as either oscillating shakes, animated shakes, or both.
An oscillating shake will sinusoidally vibrate various camera parameters over time. Each location and rotation axis can be oscillated independently with different parameters to create complex and random-feeling shakes. These are easier to author and tweak, but can still feel mechanical and are limited to vibration-style shakes, such as earthquakes.
Animated shakes play keyframed camera animations. These can take more effort to author, but enable more natural-feeling results and things like directional shakes. For instance, you can have an explosion to the camera's right push it primarily to the left.
Name | Description | ||
---|---|---|---|
|
UCameraAnim ... |
Anim |
Source camera animation to play. Can be null. |
|
float |
AnimBlendInTime |
Linear blend-in time. |
|
float |
AnimBlendOutTime |
Linear blend-out time. |
|
AnimInst |
The playing instance of the CameraAnim-based shake, if any. |
|
|
float |
AnimPlayRate |
Scalar defining how fast to play the anim. |
|
float |
AnimScale |
Scalar defining how "intense" to play the anim. |
|
uint16: 1 |
bBlendingIn |
True if this shake is currently blending in. |
|
uint16: 1 |
bBlendingOut |
True if this shake is currently blending out. |
|
uint32: 1 |
bRandomAnimSegment |
If true, play a random snippet of the animation of length Duration. |
|
uint32: 1 |
bSingleInstance |
If true to only allow a single instance of this shake class to play at any given time. |
|
CameraOwner |
||
|
float |
CurrentBlendInTime |
How long this instance has been blending in. |
|
float |
CurrentBlendOutTime |
How long this instance has been blending out. |
|
FOVOscillation |
FOV oscillation |
|
|
float |
FOVSinOffset |
Current FOV sinusoidal offset. |
|
float |
InitialFOVSinOffset |
Initial offset (could have been assigned at random). |
|
InitialLocSinOffset |
Initial offset (could have been assigned at random). |
|
|
InitialRotSinOffset |
Initial offset (could have been assigned at random). |
|
|
LocOscillation |
Positional oscillation |
|
|
LocSinOffset |
Current location sinusoidal offset. |
|
|
float |
OscillationBlendInTime |
Duration of the blend-in, where the oscillation scales from 0 to 1. |
|
float |
OscillationBlendOutTime |
Duration of the blend-out, where the oscillation scales from 1 to 0. |
|
float |
OscillationDuration |
Duration in seconds of current screen shake. Less than 0 means indefinite, 0 means no oscillation. |
|
float |
OscillatorTimeRemaining |
Time remaining for oscillation shakes. Less than 0.f means shake infinitely. |
|
PlaySpace |
What space to play the shake in before applying to the camera. |
|
|
float |
RandomAnimSegmentDuration |
When bRandomAnimSegment is true, this defines how long the anim should play. |
|
RotOscillation |
Rotational oscillation |
|
|
RotSinOffset |
Current rotational sinusoidal offset. |
|
|
float |
ShakeScale |
Overall intensity scale for this shake instance. |
|
AActor * |
TempCameraActorForCameraAnims |
Temp actor to use for playing camera anims. |
|
UserPlaySpaceMatrix |
Matrix defining the playspace, used when PlaySpace == CAPS_UserDefined |
Name | Description | |
---|---|---|
|
UCameraShake ( |
Name | Description | ||
---|---|---|---|
|
BlueprintUpdateCameraShake ( |
Called every tick to let the shake modify the point of view |
|
|
IsFinished() |
||
|
IsLooping() |
Returns true if this camera shake will loop forever. |
|
|
PlayShake ( |
||
|
ReceiveIsFinished() |
Called to allow a shake to decide when it's finished playing. |
|
|
ReceivePlayShake ( |
Called when the shake starts playing |
|
|
ReceiveStopShake ( |
Called when the shake is explicitly stopped. |
|
|
SetCurrentTimeAndApplyShake ( |
Sets current playback time and applies the shake (both oscillation and cameraanim) to the given POV. |
|
|
SetTempCameraAnimActor ( |
||
|
StopShake ( |
Stops this shake from playing. |
|
|
UpdateAndApplyCameraShake ( |
Native API. |