Feel  4.3
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feedbacks.MMF_PositionShake Class Reference

This feedback lets you emit a PositionShake event. This will be caught by MMPositionShakers (on the specified channel). Position shakers, as the name suggests, are used to shake the position of a transform, along a direction, with optional noise and other fine control options. More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_PositionShake:
MoreMountains.Feedbacks.MMF_Feedback

Public Attributes

override bool HasChannel => true
 
override bool HasRandomness => true
 
override bool HasRange => true
 
override bool HasAutomatedTargetAcquisition => true
 
MMPositionShaker TargetShaker
 a specific (and optional) shaker to target, regardless of its channel More...
 
float Duration = 0.5f
 the duration of the shake, in seconds More...
 
bool ResetShakerValuesAfterShake = true
 whether or not to reset shaker values after shake More...
 
bool ResetTargetValuesAfterShake = true
 whether or not to reset the target's values after shake More...
 
float ShakeSpeed = 20f
 the speed at which the transform should shake More...
 
float ShakeRange = 0.5f
 the maximum distance from its initial position the transform will move to during the shake More...
 
Vector3 ShakeMainDirection = Vector3.up
 the direction along which to shake the transform's position More...
 
bool RandomizeDirection = false
 if this is true, instead of using ShakeMainDirection as the direction of the shake, a random vector3 will be generated, randomized between ShakeMainDirection and ShakeAltDirection More...
 
Vector3 ShakeAltDirection = Vector3.up
 when in RandomizeDirection mode, a vector against which to randomize the main direction More...
 
bool RandomizeDirectionOnPlay = false
 if this is true, a new direction will be randomized every time a shake happens More...
 
bool RandomizeDirectionX = true
 whether or not to randomize the x value of the main direction More...
 
bool RandomizeDirectionY = true
 whether or not to randomize the y value of the main direction More...
 
bool RandomizeDirectionZ = true
 whether or not to randomize the z value of the main direction More...
 
bool AddDirectionalNoise = true
 whether or not to add noise to the main direction More...
 
Vector3 DirectionalNoiseStrengthMin = new Vector3(0.25f, 0.25f, 0.25f)
 when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMax More...
 
Vector3 DirectionalNoiseStrengthMax = new Vector3(0.25f, 0.25f, 0.25f)
 when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMin More...
 
Vector3 RandomnessSeed
 a unique seed you can use to get different outcomes when shaking more than one transform at once More...
 
bool RandomizeSeedOnShake = true
 whether or not to generate a unique seed automatically on every shake More...
 
bool UseAttenuation = true
 whether or not to use attenuation, which will impact the amplitude of the shake, along the defined curve More...
 
AnimationCurve AttenuationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))
 the animation curve used to define attenuation, impacting the amplitude of the shake More...
 

Static Public Attributes

static bool FeedbackTypeAuthorized = true
 a static bool used to disable all feedbacks of this type at once More...
 

Protected Member Functions

override void AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target) More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 Triggers the corresponding coroutine More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 On stop we stop our transition More...
 
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state More...
 

Properties

override float FeedbackDuration [get, set]
 sets the inspector color for this feedback More...
 

Additional Inherited Members

Detailed Description

This feedback lets you emit a PositionShake event. This will be caught by MMPositionShakers (on the specified channel). Position shakers, as the name suggests, are used to shake the position of a transform, along a direction, with optional noise and other fine control options.

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_PositionShake.AutomateTargetAcquisition ( )
protectedvirtual

A method meant to be implemented per feedback letting you specify what happens (usually setting a target)

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_PositionShake.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

Triggers the corresponding coroutine

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

override void MoreMountains.Feedbacks.MMF_PositionShake.CustomRestoreInitialValues ( )
protectedvirtual

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_PositionShake.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1 
)
protectedvirtual

On stop we stop our transition

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ AddDirectionalNoise

bool MoreMountains.Feedbacks.MMF_PositionShake.AddDirectionalNoise = true

whether or not to add noise to the main direction

◆ AttenuationCurve

AnimationCurve MoreMountains.Feedbacks.MMF_PositionShake.AttenuationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))

the animation curve used to define attenuation, impacting the amplitude of the shake

◆ DirectionalNoiseStrengthMax

Vector3 MoreMountains.Feedbacks.MMF_PositionShake.DirectionalNoiseStrengthMax = new Vector3(0.25f, 0.25f, 0.25f)

when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMin

◆ DirectionalNoiseStrengthMin

Vector3 MoreMountains.Feedbacks.MMF_PositionShake.DirectionalNoiseStrengthMin = new Vector3(0.25f, 0.25f, 0.25f)

when adding directional noise, noise strength will be randomized between this value and DirectionalNoiseStrengthMax

◆ Duration

float MoreMountains.Feedbacks.MMF_PositionShake.Duration = 0.5f

the duration of the shake, in seconds

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_PositionShake.FeedbackTypeAuthorized = true
static

a static bool used to disable all feedbacks of this type at once

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_PositionShake.HasAutomatedTargetAcquisition => true

◆ HasChannel

override bool MoreMountains.Feedbacks.MMF_PositionShake.HasChannel => true

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_PositionShake.HasRandomness => true

◆ HasRange

override bool MoreMountains.Feedbacks.MMF_PositionShake.HasRange => true

◆ RandomizeDirection

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeDirection = false

if this is true, instead of using ShakeMainDirection as the direction of the shake, a random vector3 will be generated, randomized between ShakeMainDirection and ShakeAltDirection

◆ RandomizeDirectionOnPlay

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeDirectionOnPlay = false

if this is true, a new direction will be randomized every time a shake happens

◆ RandomizeDirectionX

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeDirectionX = true

whether or not to randomize the x value of the main direction

◆ RandomizeDirectionY

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeDirectionY = true

whether or not to randomize the y value of the main direction

◆ RandomizeDirectionZ

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeDirectionZ = true

whether or not to randomize the z value of the main direction

◆ RandomizeSeedOnShake

bool MoreMountains.Feedbacks.MMF_PositionShake.RandomizeSeedOnShake = true

whether or not to generate a unique seed automatically on every shake

◆ RandomnessSeed

Vector3 MoreMountains.Feedbacks.MMF_PositionShake.RandomnessSeed

a unique seed you can use to get different outcomes when shaking more than one transform at once

◆ ResetShakerValuesAfterShake

bool MoreMountains.Feedbacks.MMF_PositionShake.ResetShakerValuesAfterShake = true

whether or not to reset shaker values after shake

◆ ResetTargetValuesAfterShake

bool MoreMountains.Feedbacks.MMF_PositionShake.ResetTargetValuesAfterShake = true

whether or not to reset the target's values after shake

◆ ShakeAltDirection

Vector3 MoreMountains.Feedbacks.MMF_PositionShake.ShakeAltDirection = Vector3.up

when in RandomizeDirection mode, a vector against which to randomize the main direction

◆ ShakeMainDirection

Vector3 MoreMountains.Feedbacks.MMF_PositionShake.ShakeMainDirection = Vector3.up

the direction along which to shake the transform's position

◆ ShakeRange

float MoreMountains.Feedbacks.MMF_PositionShake.ShakeRange = 0.5f

the maximum distance from its initial position the transform will move to during the shake

◆ ShakeSpeed

float MoreMountains.Feedbacks.MMF_PositionShake.ShakeSpeed = 20f

the speed at which the transform should shake

◆ TargetShaker

MMPositionShaker MoreMountains.Feedbacks.MMF_PositionShake.TargetShaker

a specific (and optional) shaker to target, regardless of its channel

◆ UseAttenuation

bool MoreMountains.Feedbacks.MMF_PositionShake.UseAttenuation = true

whether or not to use attenuation, which will impact the amplitude of the shake, along the defined curve

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_PositionShake.FeedbackDuration
getset

sets the inspector color for this feedback

returns the duration of the feedback


The documentation for this class was generated from the following file: