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

This feedback will animate the target's position (not its rotation), on an arc around the specified rotation center, for the specified duration (in seconds). More...

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

Public Types

enum  TimeScales { TimeScales.Scaled, TimeScales.Unscaled }
 the timescale modes this feedback can operate on More...
 

Public Member Functions

override void OnDisable ()
 On disable we reset our coroutine More...
 

Public Attributes

override bool HasAutomatedTargetAcquisition => true
 sets the inspector color for this feedback More...
 
Transform AnimateRotationTarget
 the object whose rotation you want to animate More...
 
Transform AnimateRotationCenter
 the object around which to rotate AnimateRotationTarget 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 = 180f
 the value to remap the curve's 1 value to More...
 
bool AnimateX = false
 if this is true, should animate movement on the X axis More...
 
AnimationCurve AnimateRotationX = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 how the x part of the movement should animate over time, in degrees More...
 
bool AnimateY = true
 if this is true, should animate movement on the Y axis 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 = false
 if this is true, should animate movement on the Z axis 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...
 
override bool HasRandomness => true
 

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 CustomInitialization (MMF_Player owner)
 On init we store our initial rotation More...
 
virtual void GetInitialPosition ()
 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 void ClearCoroutine ()
 
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...
 
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state More...
 

Protected Attributes

Vector3 _initialPosition
 
Vector3 _rotationAngles
 
Coroutine _coroutine
 

Properties

override float FeedbackDuration [get, set]
 the duration of this feedback is the duration of the rotation More...
 

Detailed Description

This feedback will animate the target's position (not its rotation), on an arc around the specified rotation center, for the specified duration (in seconds).

Member Enumeration Documentation

◆ TimeScales

the timescale modes this feedback can operate on

Enumerator
Scaled 
Unscaled 

Member Function Documentation

◆ AnimateRotation()

virtual IEnumerator MoreMountains.Feedbacks.MMF_RotatePositionAround.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_RotatePositionAround.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


◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_RotatePositionAround.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.

◆ ClearCoroutine()

virtual void MoreMountains.Feedbacks.MMF_RotatePositionAround.ClearCoroutine ( )
protectedvirtual

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_RotatePositionAround.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_RotatePositionAround.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On play, we trigger our rotation animation

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_RotatePositionAround.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.

◆ GetInitialPosition()

virtual void MoreMountains.Feedbacks.MMF_RotatePositionAround.GetInitialPosition ( )
protectedvirtual

Stores initial rotation for future use

◆ OnDisable()

override void MoreMountains.Feedbacks.MMF_RotatePositionAround.OnDisable ( )
virtual

On disable we reset our coroutine

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_RotatePositionAround._coroutine
protected

◆ _initialPosition

Vector3 MoreMountains.Feedbacks.MMF_RotatePositionAround._initialPosition
protected

◆ _rotationAngles

Vector3 MoreMountains.Feedbacks.MMF_RotatePositionAround._rotationAngles
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_RotatePositionAround.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

◆ AnimateRotationCenter

Transform MoreMountains.Feedbacks.MMF_RotatePositionAround.AnimateRotationCenter

the object around which to rotate AnimateRotationTarget

◆ AnimateRotationDuration

float MoreMountains.Feedbacks.MMF_RotatePositionAround.AnimateRotationDuration = 0.2f

the duration of the transition

◆ AnimateRotationTarget

Transform MoreMountains.Feedbacks.MMF_RotatePositionAround.AnimateRotationTarget

the object whose rotation you want to animate

◆ AnimateRotationX

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

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

◆ AnimateRotationY

AnimationCurve MoreMountains.Feedbacks.MMF_RotatePositionAround.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_RotatePositionAround.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_RotatePositionAround.AnimateX = false

if this is true, should animate movement on the X axis

◆ AnimateY

bool MoreMountains.Feedbacks.MMF_RotatePositionAround.AnimateY = true

if this is true, should animate movement on the Y axis

◆ AnimateZ

bool MoreMountains.Feedbacks.MMF_RotatePositionAround.AnimateZ = false

if this is true, should animate movement on the Z axis

◆ DetermineRotationOnPlay

bool MoreMountains.Feedbacks.MMF_RotatePositionAround.DetermineRotationOnPlay = false

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

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_RotatePositionAround.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

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

sets the inspector color for this feedback

◆ HasRandomness

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

◆ RemapCurveOne

float MoreMountains.Feedbacks.MMF_RotatePositionAround.RemapCurveOne = 180f

the value to remap the curve's 1 value to

◆ RemapCurveZero

float MoreMountains.Feedbacks.MMF_RotatePositionAround.RemapCurveZero = 0f

the value to remap the curve's 0 value to

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_RotatePositionAround.FeedbackDuration
getset

the duration of this feedback is the duration of the rotation


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