![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <CameraShakeBase.h>
Public Member Functions | |
| ENGINE_API | FCameraShakeState () |
| ENGINE_API void | Start (const FCameraShakeInfo &InShakeInfo) |
| ENGINE_API void | Start (const FCameraShakeInfo &InShakeInfo, TOptional< float > InDurationOverride) |
| ENGINE_API void | Start (const UCameraShakePattern *InShakePattern) |
| ENGINE_API void | Start (const UCameraShakePattern *InShakePattern, const FCameraShakePatternStartParams &InParams) |
| ENGINE_API float | Update (float DeltaTime) |
| ENGINE_API float | Scrub (float AbsoluteTime) |
| ENGINE_API void | Stop (bool bImmediately) |
| bool | IsPlaying () const |
| bool | IsBlendingIn () const |
| bool | IsBlendingOut () const |
| float | GetElapsedTime () const |
| float | GetCurrentBlendInTime () const |
| float | GetCurrentBlendOutTime () const |
| const FCameraShakeInfo & | GetShakeInfo () const |
| bool | HasDuration () const |
| float | GetDuration () const |
| bool | IsInfinite () const |
Transitive state of a shake or shake pattern.
| FCameraShakeState::FCameraShakeState | ( | ) |
Create a new camera shake state
|
inline |
Returns the current time into the blend in (only valid if IsBlendingIn() returns true)
|
inline |
Returns the current time into the blend in (only valid if IsBlendingOut() returns true)
|
inline |
Helper method to get GetShakeInfo().Duration.Get()
|
inline |
Returns the elapsed time of the shake's current run
|
inline |
Returns the current shake info
|
inline |
Helper method to get GetShakeInfo().Duration.IsFixed()
|
inline |
Returns whether the shake is blending in
|
inline |
Returns whether the shake is blending out
|
inline |
Helper method to get GetShakeInfo().Duration.IsInifnite()
|
inline |
Returns whether the shake is playing
Scrub the state to the given absolute time.
If the state isn't managed (i.e. it doesn't have any fixed duration information), this doesn't do anything and returns 1.
If the state is managed, this updates the internal state of this class and auto-computes when the shake has ended, along with a blending weight if there is any blending in/out.
| AbsoluteTime | The time to scrub to |
| void FCameraShakeState::Start | ( | const FCameraShakeInfo & | InShakeInfo | ) |
Initialize the state with a shake's info and start playing.
| void FCameraShakeState::Start | ( | const FCameraShakeInfo & | InShakeInfo, |
| TOptional< float > | InDurationOverride | ||
| ) |
Initialize the state with a shake's info and start playing.
| void FCameraShakeState::Start | ( | const UCameraShakePattern * | InShakePattern | ) |
Initialize the state with a shake's info and start playing.
| void FCameraShakeState::Start | ( | const UCameraShakePattern * | InShakePattern, |
| const FCameraShakePatternStartParams & | InParams | ||
| ) |
Initialize the state with a shake's info and start playing.
Marks the shake has having been stopped.
This renders the shake inactive (if we need to stop immediately), or starts the shake's blend-out, if any (if we don't stop immediately). If no duration or blending information is available (i.e. if the shake duration is "Custom"), stopping non-immediately does nothing: the sub-class is expected to handle it.
Updates the state with a delta time.
If the state isn't managed (i.e. it doesn't have any fixed duration information), this doesn't do anything and returns 1.
If the state is managed, this updates the internal state of this class and auto-computes when the shake has ended, along with a blending weight if there is any blending in/out.
| DeltaTime | The elapsed time since last update |