TopDown Engine  v4.1
MoreMountains.Feedbacks.MMWiggle Class Reference

Add this class to a GameObject to be able to control its position/rotation/scale individually and periodically, allowing it to "wiggle" (or just move however you want on a periodic basis) More...

Inheritance diagram for MoreMountains.Feedbacks.MMWiggle:

Public Types

enum  UpdateModes { UpdateModes.Update, UpdateModes.FixedUpdate, UpdateModes.LateUpdate }
 the possible update modes More...
 

Public Member Functions

virtual void WigglePosition (float duration)
 
virtual void WiggleRotation (float duration)
 
virtual void WiggleScale (float duration)
 
virtual void Initialization ()
 On init we get the start values and trigger our coroutines for each property More...
 
virtual void RestoreInitialValues ()
 

Public Attributes

UpdateModes UpdateMode = UpdateModes.Update
 the selected update mode More...
 
bool PositionActive = false
 whether or not position wiggle is active More...
 
bool RotationActive = false
 whether or not rotation wiggle is active More...
 
bool ScaleActive = false
 whether or not scale wiggle is active More...
 
WiggleProperties PositionWiggleProperties
 all public info related to position wiggling More...
 
WiggleProperties RotationWiggleProperties
 all public info related to rotation wiggling More...
 
WiggleProperties ScaleWiggleProperties
 all public info related to scale wiggling More...
 
float DebugWiggleDuration = 2f
 a debug duration used in conjunction with the debug buttons More...
 

Protected Member Functions

virtual void WiggleValue (ref WiggleProperties property, ref InternalWiggleProperties internalProperties, float duration)
 
virtual void Start ()
 On Start() we trigger the initialization More...
 
virtual void InitializeRandomValues (ref WiggleProperties properties, ref InternalWiggleProperties internalProperties)
 Initializes internal properties of the specified wiggle value More...
 
virtual void Update ()
 Every frame we update our object's position, rotation and scale More...
 
virtual void LateUpdate ()
 Every frame we update our object's position, rotation and scale More...
 
virtual void FixedUpdate ()
 Every frame we update our object's position, rotation and scale More...
 
virtual void ProcessUpdate ()
 Meant to be executed at the selected UpdateMode More...
 
virtual bool UpdateValue (bool valueActive, WiggleProperties properties, ref InternalWiggleProperties internalProperties)
 Computes the next Vector3 value for the specified property More...
 
float ApplyFalloff (WiggleProperties properties)
 Applies a falloff to the computed value based on time spent and a falloff animation curve More...
 
virtual Vector3 AnimateNoiseValue (ref InternalWiggleProperties internalProperties, WiggleProperties properties)
 Animates a Vector3 value along a perlin noise More...
 
virtual Vector3 AnimateCurveValue (ref InternalWiggleProperties internalProperties, WiggleProperties properties)
 Animates a Vector3 value along a specified curve More...
 
virtual void EvaluateCurve (AnimationCurve curve, float percent, Vector3 remapMin, Vector3 remapMax, ref Vector3 returnValue, WiggleProperties properties)
 
virtual bool MoveVector3TowardsTarget (ref Vector3 movedValue, WiggleProperties properties, ref Vector3 startValue, Vector3 initialValue, ref Vector3 destinationValue, ref float timeSinceLastPause, ref float timeSinceLastValueChange, ref Vector3 randomAmplitude, ref float randomFrequency, ref float pauseDuration, float frequency)
 Moves a vector3's values towards a target More...
 
virtual Vector3 DetermineNewValue (WiggleProperties properties, Vector3 newValue, Vector3 initialValue, ref Vector3 startValue, ref Vector3 randomAmplitude, ref float randomFrequency, ref float pauseDuration, bool firstPlay=false)
 Picks a new target value More...
 
virtual float RandomizeFloat (ref float randomizedFloat, float floatMin, float floatMax)
 Randomizes a float between bounds More...
 
virtual Vector3 RandomizeVector3 (ref Vector3 randomizedVector, Vector3 vectorMin, Vector3 vectorMax)
 Randomizes a vector3 within bounds More...
 

Protected Attributes

InternalWiggleProperties _positionInternalProperties
 
InternalWiggleProperties _rotationInternalProperties
 
InternalWiggleProperties _scaleInternalProperties
 

Detailed Description

Add this class to a GameObject to be able to control its position/rotation/scale individually and periodically, allowing it to "wiggle" (or just move however you want on a periodic basis)

Member Enumeration Documentation

◆ UpdateModes

the possible update modes

Enumerator
Update 
FixedUpdate 
LateUpdate 

Member Function Documentation

◆ AnimateCurveValue()

virtual Vector3 MoreMountains.Feedbacks.MMWiggle.AnimateCurveValue ( ref InternalWiggleProperties  internalProperties,
WiggleProperties  properties 
)
protectedvirtual

Animates a Vector3 value along a specified curve

Parameters
internalProperties
properties
Returns

◆ AnimateNoiseValue()

virtual Vector3 MoreMountains.Feedbacks.MMWiggle.AnimateNoiseValue ( ref InternalWiggleProperties  internalProperties,
WiggleProperties  properties 
)
protectedvirtual

Animates a Vector3 value along a perlin noise

Parameters
internalProperties
properties
Returns

◆ ApplyFalloff()

float MoreMountains.Feedbacks.MMWiggle.ApplyFalloff ( WiggleProperties  properties)
protected

Applies a falloff to the computed value based on time spent and a falloff animation curve

Parameters
newValue
properties
Returns

◆ DetermineNewValue()

virtual Vector3 MoreMountains.Feedbacks.MMWiggle.DetermineNewValue ( WiggleProperties  properties,
Vector3  newValue,
Vector3  initialValue,
ref Vector3  startValue,
ref Vector3  randomAmplitude,
ref float  randomFrequency,
ref float  pauseDuration,
bool  firstPlay = false 
)
protectedvirtual

Picks a new target value

Parameters
properties
newValue
initialValue
startValue
randomAmplitude
randomFrequency
pauseDuration
Returns

◆ EvaluateCurve()

virtual void MoreMountains.Feedbacks.MMWiggle.EvaluateCurve ( AnimationCurve  curve,
float  percent,
Vector3  remapMin,
Vector3  remapMax,
ref Vector3  returnValue,
WiggleProperties  properties 
)
protectedvirtual

◆ FixedUpdate()

virtual void MoreMountains.Feedbacks.MMWiggle.FixedUpdate ( )
protectedvirtual

Every frame we update our object's position, rotation and scale

◆ Initialization()

virtual void MoreMountains.Feedbacks.MMWiggle.Initialization ( )
virtual

On init we get the start values and trigger our coroutines for each property

◆ InitializeRandomValues()

virtual void MoreMountains.Feedbacks.MMWiggle.InitializeRandomValues ( ref WiggleProperties  properties,
ref InternalWiggleProperties  internalProperties 
)
protectedvirtual

Initializes internal properties of the specified wiggle value

Parameters
properties
internalProperties

◆ LateUpdate()

virtual void MoreMountains.Feedbacks.MMWiggle.LateUpdate ( )
protectedvirtual

Every frame we update our object's position, rotation and scale

◆ MoveVector3TowardsTarget()

virtual bool MoreMountains.Feedbacks.MMWiggle.MoveVector3TowardsTarget ( ref Vector3  movedValue,
WiggleProperties  properties,
ref Vector3  startValue,
Vector3  initialValue,
ref Vector3  destinationValue,
ref float  timeSinceLastPause,
ref float  timeSinceLastValueChange,
ref Vector3  randomAmplitude,
ref float  randomFrequency,
ref float  pauseDuration,
float  frequency 
)
protectedvirtual

Moves a vector3's values towards a target

Parameters
movedValue
properties
startValue
initialValue
destinationValue
timeSinceLastPause
timeSinceLastValueChange
randomAmplitude
randomFrequency
pauseDuration
frequency
Returns

◆ ProcessUpdate()

virtual void MoreMountains.Feedbacks.MMWiggle.ProcessUpdate ( )
protectedvirtual

Meant to be executed at the selected UpdateMode

◆ RandomizeFloat()

virtual float MoreMountains.Feedbacks.MMWiggle.RandomizeFloat ( ref float  randomizedFloat,
float  floatMin,
float  floatMax 
)
protectedvirtual

Randomizes a float between bounds

Parameters
randomizedFloat
floatMin
floatMax
Returns

◆ RandomizeVector3()

virtual Vector3 MoreMountains.Feedbacks.MMWiggle.RandomizeVector3 ( ref Vector3  randomizedVector,
Vector3  vectorMin,
Vector3  vectorMax 
)
protectedvirtual

Randomizes a vector3 within bounds

Parameters
randomizedVector
vectorMin
vectorMax
Returns

◆ RestoreInitialValues()

virtual void MoreMountains.Feedbacks.MMWiggle.RestoreInitialValues ( )
virtual

◆ Start()

virtual void MoreMountains.Feedbacks.MMWiggle.Start ( )
protectedvirtual

On Start() we trigger the initialization

◆ Update()

virtual void MoreMountains.Feedbacks.MMWiggle.Update ( )
protectedvirtual

Every frame we update our object's position, rotation and scale

◆ UpdateValue()

virtual bool MoreMountains.Feedbacks.MMWiggle.UpdateValue ( bool  valueActive,
WiggleProperties  properties,
ref InternalWiggleProperties  internalProperties 
)
protectedvirtual

Computes the next Vector3 value for the specified property

Parameters
valueActive
properties
internalProperties
Returns

◆ WigglePosition()

virtual void MoreMountains.Feedbacks.MMWiggle.WigglePosition ( float  duration)
virtual

◆ WiggleRotation()

virtual void MoreMountains.Feedbacks.MMWiggle.WiggleRotation ( float  duration)
virtual

◆ WiggleScale()

virtual void MoreMountains.Feedbacks.MMWiggle.WiggleScale ( float  duration)
virtual

◆ WiggleValue()

virtual void MoreMountains.Feedbacks.MMWiggle.WiggleValue ( ref WiggleProperties  property,
ref InternalWiggleProperties  internalProperties,
float  duration 
)
protectedvirtual

Member Data Documentation

◆ _positionInternalProperties

InternalWiggleProperties MoreMountains.Feedbacks.MMWiggle._positionInternalProperties
protected

◆ _rotationInternalProperties

InternalWiggleProperties MoreMountains.Feedbacks.MMWiggle._rotationInternalProperties
protected

◆ _scaleInternalProperties

InternalWiggleProperties MoreMountains.Feedbacks.MMWiggle._scaleInternalProperties
protected

◆ DebugWiggleDuration

float MoreMountains.Feedbacks.MMWiggle.DebugWiggleDuration = 2f

a debug duration used in conjunction with the debug buttons

◆ PositionActive

bool MoreMountains.Feedbacks.MMWiggle.PositionActive = false

whether or not position wiggle is active

◆ PositionWiggleProperties

WiggleProperties MoreMountains.Feedbacks.MMWiggle.PositionWiggleProperties

all public info related to position wiggling

◆ RotationActive

bool MoreMountains.Feedbacks.MMWiggle.RotationActive = false

whether or not rotation wiggle is active

◆ RotationWiggleProperties

WiggleProperties MoreMountains.Feedbacks.MMWiggle.RotationWiggleProperties

all public info related to rotation wiggling

◆ ScaleActive

bool MoreMountains.Feedbacks.MMWiggle.ScaleActive = false

whether or not scale wiggle is active

◆ ScaleWiggleProperties

WiggleProperties MoreMountains.Feedbacks.MMWiggle.ScaleWiggleProperties

all public info related to scale wiggling

◆ UpdateMode

UpdateModes MoreMountains.Feedbacks.MMWiggle.UpdateMode = UpdateModes.Update

the selected update mode


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