Infinite Runner Engine v1.9
Public Types | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
MoreMountains.Feedbacks.MMF_Rotation Class Reference

This feedback animates the rotation of the specified object when played More...

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

Public Types

enum  Modes { Absolute , Additive , ToDestination }
 the possible modes for this feedback (Absolute : always follow the curve from start to finish, Additive : add to the values found when this feedback gets played) More...
 
enum  TimeScales { Scaled , Unscaled }
 the timescale modes this feedback can operate on More...
 

Public Attributes

Transform AnimateRotationTarget
 sets the inspector color for this feedback More...
 
Modes Mode = Modes.Absolute
 whether this feedback should animate in absolute values or additive More...
 
Space RotationSpace = Space.World
 whether this feedback should play on local or world rotation More...
 
float AnimateRotationDuration = 0.2f
 the duration of the transition More...
 
float RemapCurveZero = 0f
 the value to remap the curve's 0 value to More...
 
float RemapCurveOne = 360f
 the value to remap the curve's 1 value to More...
 
bool AnimateX = true
 if this is true, should animate the X rotation More...
 
AnimationCurve AnimateRotationX = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 how the x part of the rotation should animate over time, in degrees More...
 
bool AnimateY = true
 if this is true, should animate the X rotation More...
 
AnimationCurve AnimateRotationY = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 how the y part of the rotation should animate over time, in degrees More...
 
bool AnimateZ = true
 if this is true, should animate the X rotation More...
 
AnimationCurve AnimateRotationZ = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 how the z part of the rotation should animate over time, in degrees More...
 
bool AllowAdditivePlays = false
 if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over More...
 
bool DetermineRotationOnPlay = false
 if this is true, initial and destination rotations will be recomputed on every play More...
 
Space ToDestinationSpace = Space.World
 the space in which the ToDestination mode should operate More...
 
Vector3 DestinationAngles = new Vector3(0f, 180f, 0f)
 the angles to match when in ToDestination mode More...
 
AnimationCurve ToDestinationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1f))
 the animation curve to use when animating to destination (individual x,y,z curves above won't be used) 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 CustomInitialization (MMF_Player owner)
 On init we store our initial rotation More...
 
virtual void GetInitialRotation ()
 Stores initial rotation for future use More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On play, we trigger our rotation animation More...
 
virtual IEnumerator RotateToDestination ()
 A coroutine used to rotate the target to its destination rotation More...
 
virtual IEnumerator AnimateRotation (Transform targetTransform, Vector3 vector, float duration, AnimationCurve curveX, AnimationCurve curveY, AnimationCurve curveZ, float remapZero, float remapOne)
 A coroutine used to compute the rotation over time More...
 
virtual void ApplyRotation (Transform targetTransform, float remapZero, float remapOne, AnimationCurve curveX, AnimationCurve curveY, AnimationCurve curveZ, float percent)
 Computes and applies the rotation to the object More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On stop, we interrupt movement if it was active More...
 
virtual void OnDisable ()
 On disable we reset our coroutine More...
 

Protected Attributes

Quaternion _initialRotation
 
Vector3 _initialToDestinationAngles
 
Quaternion _destinationRotation
 
Coroutine _coroutine
 

Properties

override float FeedbackDuration [getset]
 the duration of this feedback is the duration of the rotation More...
 

Additional Inherited Members

Detailed Description

This feedback animates the rotation of the specified object when played

Member Enumeration Documentation

◆ Modes

the possible modes for this feedback (Absolute : always follow the curve from start to finish, Additive : add to the values found when this feedback gets played)

Enumerator
Absolute 
Additive 
ToDestination 

◆ TimeScales

the timescale modes this feedback can operate on

Enumerator
Scaled 
Unscaled 

Member Function Documentation

◆ AnimateRotation()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Rotation.AnimateRotation ( Transform  targetTransform,
Vector3  vector,
float  duration,
AnimationCurve  curveX,
AnimationCurve  curveY,
AnimationCurve  curveZ,
float  remapZero,
float  remapOne 
)
protectedvirtual

A coroutine used to compute the rotation over time

Parameters
targetTransform
vector
duration
curveX
curveY
curveZ
multiplier
Returns

◆ ApplyRotation()

virtual void MoreMountains.Feedbacks.MMF_Rotation.ApplyRotation ( Transform  targetTransform,
float  remapZero,
float  remapOne,
AnimationCurve  curveX,
AnimationCurve  curveY,
AnimationCurve  curveZ,
float  percent 
)
protectedvirtual

Computes and applies the rotation to the object

Parameters
targetTransform
multiplier
curveX
curveY
curveZ
percent


◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_Rotation.CustomInitialization ( MMF_Player  owner)
protectedvirtual

On init we store our initial rotation

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

On play, we trigger our rotation animation

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

On stop, we interrupt movement if it was active

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ GetInitialRotation()

virtual void MoreMountains.Feedbacks.MMF_Rotation.GetInitialRotation ( )
protectedvirtual

Stores initial rotation for future use

◆ OnDisable()

virtual void MoreMountains.Feedbacks.MMF_Rotation.OnDisable ( )
protectedvirtual

On disable we reset our coroutine

◆ RotateToDestination()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Rotation.RotateToDestination ( )
protectedvirtual

A coroutine used to rotate the target to its destination rotation

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_Rotation._coroutine
protected

◆ _destinationRotation

Quaternion MoreMountains.Feedbacks.MMF_Rotation._destinationRotation
protected

◆ _initialRotation

Quaternion MoreMountains.Feedbacks.MMF_Rotation._initialRotation
protected

◆ _initialToDestinationAngles

Vector3 MoreMountains.Feedbacks.MMF_Rotation._initialToDestinationAngles
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_Rotation.AllowAdditivePlays = false

if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over

◆ AnimateRotationDuration

float MoreMountains.Feedbacks.MMF_Rotation.AnimateRotationDuration = 0.2f

the duration of the transition

◆ AnimateRotationTarget

Transform MoreMountains.Feedbacks.MMF_Rotation.AnimateRotationTarget

sets the inspector color for this feedback

the object whose rotation you want to animate

◆ AnimateRotationX

AnimationCurve MoreMountains.Feedbacks.MMF_Rotation.AnimateRotationX = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))

how the x part of the rotation should animate over time, in degrees

◆ AnimateRotationY

AnimationCurve MoreMountains.Feedbacks.MMF_Rotation.AnimateRotationY = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))

how the y part of the rotation should animate over time, in degrees

◆ AnimateRotationZ

AnimationCurve MoreMountains.Feedbacks.MMF_Rotation.AnimateRotationZ = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))

how the z part of the rotation should animate over time, in degrees

◆ AnimateX

bool MoreMountains.Feedbacks.MMF_Rotation.AnimateX = true

if this is true, should animate the X rotation

◆ AnimateY

bool MoreMountains.Feedbacks.MMF_Rotation.AnimateY = true

if this is true, should animate the X rotation

◆ AnimateZ

bool MoreMountains.Feedbacks.MMF_Rotation.AnimateZ = true

if this is true, should animate the X rotation

◆ DestinationAngles

Vector3 MoreMountains.Feedbacks.MMF_Rotation.DestinationAngles = new Vector3(0f, 180f, 0f)

the angles to match when in ToDestination mode

◆ DetermineRotationOnPlay

bool MoreMountains.Feedbacks.MMF_Rotation.DetermineRotationOnPlay = false

if this is true, initial and destination rotations will be recomputed on every play

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Rotation.FeedbackTypeAuthorized = true
static

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

◆ Mode

Modes MoreMountains.Feedbacks.MMF_Rotation.Mode = Modes.Absolute

whether this feedback should animate in absolute values or additive

◆ RemapCurveOne

float MoreMountains.Feedbacks.MMF_Rotation.RemapCurveOne = 360f

the value to remap the curve's 1 value to

◆ RemapCurveZero

float MoreMountains.Feedbacks.MMF_Rotation.RemapCurveZero = 0f

the value to remap the curve's 0 value to

◆ RotationSpace

Space MoreMountains.Feedbacks.MMF_Rotation.RotationSpace = Space.World

whether this feedback should play on local or world rotation

◆ ToDestinationCurve

AnimationCurve MoreMountains.Feedbacks.MMF_Rotation.ToDestinationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1f))

the animation curve to use when animating to destination (individual x,y,z curves above won't be used)

◆ ToDestinationSpace

Space MoreMountains.Feedbacks.MMF_Rotation.ToDestinationSpace = Space.World

the space in which the ToDestination mode should operate

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_Rotation.FeedbackDuration
getset

the duration of this feedback is the duration of the rotation


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