![]() |
Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
|
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...
Public Types | |
| enum | UpdateModes { Update , FixedUpdate , 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. | |
| virtual void | RestoreInitialValues () |
Public Attributes | |
| UpdateModes | UpdateMode = UpdateModes.Update |
| the selected update mode | |
| bool | PositionActive = false |
| whether or not position wiggle is active | |
| bool | RotationActive = false |
| whether or not rotation wiggle is active | |
| bool | ScaleActive = false |
| whether or not scale wiggle is active | |
| WiggleProperties | PositionWiggleProperties |
| all public info related to position wiggling | |
| WiggleProperties | RotationWiggleProperties |
| all public info related to rotation wiggling | |
| WiggleProperties | ScaleWiggleProperties |
| all public info related to scale wiggling | |
| float | DebugWiggleDuration = 2f |
| a debug duration used in conjunction with the debug buttons | |
Protected Member Functions | |
| virtual void | WiggleValue (ref WiggleProperties property, ref InternalWiggleProperties internalProperties, float duration) |
| virtual void | Start () |
| On Start() we trigger the initialization. | |
| virtual void | InitializeRandomValues (ref WiggleProperties properties, ref InternalWiggleProperties internalProperties) |
| Initializes internal properties of the specified wiggle value. | |
| virtual void | Update () |
| Every frame we update our object's position, rotation and scale. | |
| virtual void | LateUpdate () |
| Every frame we update our object's position, rotation and scale. | |
| virtual void | FixedUpdate () |
| Every frame we update our object's position, rotation and scale. | |
| virtual void | ProcessUpdate () |
| Meant to be executed at the selected UpdateMode. | |
| virtual bool | UpdateValue (bool valueActive, WiggleProperties properties, ref InternalWiggleProperties internalProperties) |
| Computes the next Vector3 value for the specified property. | |
| float | ApplyFalloff (WiggleProperties properties) |
| Applies a falloff to the computed value based on time spent and a falloff animation curve. | |
| virtual Vector3 | AnimateNoiseValue (ref InternalWiggleProperties internalProperties, WiggleProperties properties) |
| Animates a Vector3 value along a perlin noise. | |
| virtual Vector3 | AnimateCurveValue (ref InternalWiggleProperties internalProperties, WiggleProperties properties) |
| Animates a Vector3 value along a specified curve. | |
| 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. | |
| 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. | |
| virtual float | RandomizeFloat (ref float randomizedFloat, float floatMin, float floatMax) |
| Randomizes a float between bounds. | |
| virtual Vector3 | RandomizeVector3 (ref Vector3 randomizedVector, Vector3 vectorMin, Vector3 vectorMax) |
| Randomizes a vector3 within bounds. | |
| virtual void | OnValidate () |
| On Validate, if the app is running, we reinitialize to allow for faster iteration times. | |
Protected Attributes | |
| InternalWiggleProperties | _positionInternalProperties |
| InternalWiggleProperties | _rotationInternalProperties |
| InternalWiggleProperties | _scaleInternalProperties |
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)
|
protectedvirtual |
Animates a Vector3 value along a specified curve.
| internalProperties | |
| properties |
|
protectedvirtual |
Animates a Vector3 value along a perlin noise.
| internalProperties | |
| properties |
|
protected |
Applies a falloff to the computed value based on time spent and a falloff animation curve.
| newValue | |
| properties |
|
protectedvirtual |
Picks a new target value.
| properties | |
| newValue | |
| initialValue | |
| startValue | |
| randomAmplitude | |
| randomFrequency | |
| pauseDuration |
|
protectedvirtual |
|
protectedvirtual |
Every frame we update our object's position, rotation and scale.
|
virtual |
On init we get the start values and trigger our coroutines for each property.
|
protectedvirtual |
Initializes internal properties of the specified wiggle value.
| properties | |
| internalProperties |
|
protectedvirtual |
Every frame we update our object's position, rotation and scale.
|
protectedvirtual |
Moves a vector3's values towards a target.
| movedValue | |
| properties | |
| startValue | |
| initialValue | |
| destinationValue | |
| timeSinceLastPause | |
| timeSinceLastValueChange | |
| randomAmplitude | |
| randomFrequency | |
| pauseDuration | |
| frequency |
|
protectedvirtual |
On Validate, if the app is running, we reinitialize to allow for faster iteration times.
|
protectedvirtual |
Meant to be executed at the selected UpdateMode.
|
protectedvirtual |
Randomizes a float between bounds.
| randomizedFloat | |
| floatMin | |
| floatMax |
|
protectedvirtual |
Randomizes a vector3 within bounds.
| randomizedVector | |
| vectorMin | |
| vectorMax |
|
virtual |
|
protectedvirtual |
On Start() we trigger the initialization.
|
protectedvirtual |
Every frame we update our object's position, rotation and scale.
|
protectedvirtual |
Computes the next Vector3 value for the specified property.
| valueActive | |
| properties | |
| internalProperties |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
| float MoreMountains.Feedbacks.MMWiggle.DebugWiggleDuration = 2f |
a debug duration used in conjunction with the debug buttons
| bool MoreMountains.Feedbacks.MMWiggle.PositionActive = false |
whether or not position wiggle is active
| WiggleProperties MoreMountains.Feedbacks.MMWiggle.PositionWiggleProperties |
all public info related to position wiggling
| bool MoreMountains.Feedbacks.MMWiggle.RotationActive = false |
whether or not rotation wiggle is active
| WiggleProperties MoreMountains.Feedbacks.MMWiggle.RotationWiggleProperties |
all public info related to rotation wiggling
| bool MoreMountains.Feedbacks.MMWiggle.ScaleActive = false |
whether or not scale wiggle is active
| WiggleProperties MoreMountains.Feedbacks.MMWiggle.ScaleWiggleProperties |
all public info related to scale wiggling
| UpdateModes MoreMountains.Feedbacks.MMWiggle.UpdateMode = UpdateModes.Update |
the selected update mode