|  | Inventory Engine v4.2
    | 
Add this component to an object and it'll get moved towards the target at update, with or without interpolation based on your settings. More...
Inherits MonoBehaviour.
| Public Types | |
| enum | UpdateModes { Update , FixedUpdate , LateUpdate } | 
| the possible update modes  More... | |
| enum | FollowModes { RegularLerp , MMLerp , MMSpring } | 
| the possible follow modes  More... | |
| enum | PositionSpaces { World , Local } | 
| whether to operate in world or local space  More... | |
| Public Member Functions | |
| virtual void | Initialization () | 
| Initializes the follow. | |
| virtual void | StopFollowing () | 
| Prevents the object from following the target anymore. | |
| virtual void | StartFollowing () | 
| Makes the object follow the target. | |
| virtual void | ChangeFollowTarget (Transform newTarget) | 
| Public Attributes | |
| bool | FollowPosition = true | 
| whether or not the object is currently following its target's position | |
| bool | FollowPositionX = true | 
| whether this object should follow its target on the X axis | |
| bool | FollowPositionY = true | 
| whether this object should follow its target on the Y axis | |
| bool | FollowPositionZ = true | 
| whether this object should follow its target on the Z axis | |
| PositionSpaces | PositionSpace = PositionSpaces.World | 
| whether to operate in world or local space | |
| bool | FollowRotation = true | 
| whether or not the object is currently following its target's rotation | |
| bool | FollowScale = true | 
| whether or not the object is currently following its target's rotation | |
| float | FollowScaleFactor = 1f | 
| the factor to apply to the scale when following | |
| Transform | Target | 
| the target to follow | |
| Vector3 | Offset | 
| the offset to apply to the followed target | |
| bool | AddInitialDistanceXToXOffset = false | 
| whether or not to add the initial x distance to the offset | |
| bool | AddInitialDistanceYToYOffset = false | 
| whether or not to add the initial y distance to the offset | |
| bool | AddInitialDistanceZToZOffset = false | 
| whether or not to add the initial z distance to the offset | |
| bool | InterpolatePosition = true | 
| whether or not we need to interpolate the movement | |
| FollowModes | FollowPositionMode = FollowModes.MMLerp | 
| the follow mode to use when following position | |
| float | FollowPositionSpeed = 10f | 
| the speed at which to interpolate the follower's movement | |
| float | PositionSpringDamping = 0.3f | 
| higher values mean more damping, less spring, low values mean less damping, more spring | |
| float | PositionSpringFrequency = 3f | 
| the frequency at which the spring should "vibrate", in Hz (1 : the spring will do one full period in one second) | |
| bool | InterpolateRotation = true | 
| whether or not we need to interpolate the movement | |
| FollowModes | FollowRotationMode = FollowModes.MMLerp | 
| the follow mode to use when interpolating the rotation | |
| float | FollowRotationSpeed = 10f | 
| the speed at which to interpolate the follower's rotation | |
| float | RotationSpringDamping = 0.3f | 
| higher values mean more damping, less spring, low values mean less damping, more spring | |
| float | RotationSpringFrequency = 3f | 
| the frequency at which the spring should "vibrate", in Hz (1 : the spring will do one full period in one second) | |
| bool | InterpolateScale = true | 
| whether or not we need to interpolate the scale | |
| FollowModes | FollowScaleMode = FollowModes.MMLerp | 
| the follow mode to use when interpolating the scale | |
| float | FollowScaleSpeed = 10f | 
| the speed at which to interpolate the follower's scale | |
| float | ScaleSpringDamping = 0.3f | 
| higher values mean more damping, less spring, low values mean less damping, more spring | |
| float | ScaleSpringFrequency = 3f | 
| the frequency at which the spring should "vibrate", in Hz (1 : the spring will do one full period in one second) | |
| UpdateModes | UpdateMode = UpdateModes.Update | 
| the update at which the movement happens | |
| bool | DisableSelfOnSetActiveFalse = false | 
| if this is true, this component will self disable when its host game object gets disabled | |
| bool | UseMinimumDistanceBeforeFollow = false | 
| whether or not to force a minimum distance between the object and its target before it starts following | |
| float | MinimumDistanceBeforeFollow = 1f | 
| the minimum distance to keep between the object and its target | |
| bool | UseMaximumDistance = false | 
| whether or not we want to make sure the object is never too far away from its target | |
| float | MaximumDistance = 1f | 
| the maximum distance at which the object can be away from its target | |
| bool | AnchorToInitialPosition | 
| if this is true, the movement will be constrained around the initial position | |
| float | MaxDistanceToAnchor = 1f | 
| the maximum distance around the initial position at which the transform can move | |
| Protected Member Functions | |
| virtual void | Start () | 
| On start we store our initial position. | |
| virtual void | SetInitialPosition () | 
| Stores the initial position. | |
| virtual void | SetOffset () | 
| Adds initial offset to the offset if needed. | |
| virtual void | Update () | 
| At update we follow our target. | |
| virtual void | FixedUpdate () | 
| At fixed update we follow our target. | |
| virtual void | LateUpdate () | 
| At late update we follow our target. | |
| virtual void | FollowTargetPosition () | 
| Follows the target, lerping the position or not based on what's been defined in the inspector. | |
| virtual float | ApplyMinMaxDistancing (float trueDistance, float interpolatedDistance) | 
| Applies minimal and maximal distance rules to the interpolated distance. | |
| virtual void | FollowTargetRotation () | 
| Makes the object follow its target's rotation. | |
| virtual void | FollowTargetScale () | 
| Makes the object follow its target's scale. | |
| virtual void | OnDisable () | 
| Protected Attributes | |
| Vector3 | _positionVelocity = Vector3.zero | 
| Vector3 | _scaleVelocity = Vector3.zero | 
| Vector3 | _rotationVelocity = Vector3.zero | 
| Vector3 | _initialPosition | 
| Vector3 | _direction | 
| Vector3 | _newPosition | 
| Vector3 | _newRotation | 
| Vector3 | _newScale | 
| Vector3 | _newTargetPosition | 
| Quaternion | _newTargetRotation | 
| Vector3 | _newTargetRotationEulerAngles | 
| Vector3 | _newTargetRotationEulerAnglesLastFrame | 
| Vector3 | _newTargetScale | 
| float | _rotationFloatVelocity | 
| float | _rotationFloatCurrent | 
| float | _rotationFloatTarget | 
| Vector3 | _currentRotationEulerAngles | 
| Quaternion | _rotationBeforeSpring | 
| Quaternion | _initialRotation | 
| Vector3 | _lastTargetPosition | 
| Properties | |
| bool | _localSpace  [get] | 
Add this component to an object and it'll get moved towards the target at update, with or without interpolation based on your settings.
| 
 | protectedvirtual | 
Applies minimal and maximal distance rules to the interpolated distance.
| trueDistance | |
| interpolatedDistance | 
| 
 | virtual | 
| 
 | protectedvirtual | 
At fixed update we follow our target.
| 
 | protectedvirtual | 
Follows the target, lerping the position or not based on what's been defined in the inspector.
| 
 | protectedvirtual | 
Makes the object follow its target's rotation.
| 
 | protectedvirtual | 
Makes the object follow its target's scale.
| 
 | virtual | 
Initializes the follow.
| 
 | protectedvirtual | 
At late update we follow our target.
| 
 | protectedvirtual | 
| 
 | protectedvirtual | 
Stores the initial position.
| 
 | protectedvirtual | 
Adds initial offset to the offset if needed.
| 
 | protectedvirtual | 
On start we store our initial position.
| 
 | virtual | 
Makes the object follow the target.
| 
 | virtual | 
Prevents the object from following the target anymore.
| 
 | protectedvirtual | 
At update we follow our target.
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| bool MoreMountains.Tools.MMFollowTarget.AddInitialDistanceXToXOffset = false | 
whether or not to add the initial x distance to the offset
| bool MoreMountains.Tools.MMFollowTarget.AddInitialDistanceYToYOffset = false | 
whether or not to add the initial y distance to the offset
| bool MoreMountains.Tools.MMFollowTarget.AddInitialDistanceZToZOffset = false | 
whether or not to add the initial z distance to the offset
| bool MoreMountains.Tools.MMFollowTarget.AnchorToInitialPosition | 
if this is true, the movement will be constrained around the initial position
| bool MoreMountains.Tools.MMFollowTarget.DisableSelfOnSetActiveFalse = false | 
if this is true, this component will self disable when its host game object gets disabled
| bool MoreMountains.Tools.MMFollowTarget.FollowPosition = true | 
whether or not the object is currently following its target's position
| FollowModes MoreMountains.Tools.MMFollowTarget.FollowPositionMode = FollowModes.MMLerp | 
the follow mode to use when following position
| float MoreMountains.Tools.MMFollowTarget.FollowPositionSpeed = 10f | 
the speed at which to interpolate the follower's movement
| bool MoreMountains.Tools.MMFollowTarget.FollowPositionX = true | 
whether this object should follow its target on the X axis
| bool MoreMountains.Tools.MMFollowTarget.FollowPositionY = true | 
whether this object should follow its target on the Y axis
| bool MoreMountains.Tools.MMFollowTarget.FollowPositionZ = true | 
whether this object should follow its target on the Z axis
| bool MoreMountains.Tools.MMFollowTarget.FollowRotation = true | 
whether or not the object is currently following its target's rotation
| FollowModes MoreMountains.Tools.MMFollowTarget.FollowRotationMode = FollowModes.MMLerp | 
the follow mode to use when interpolating the rotation
| float MoreMountains.Tools.MMFollowTarget.FollowRotationSpeed = 10f | 
the speed at which to interpolate the follower's rotation
| bool MoreMountains.Tools.MMFollowTarget.FollowScale = true | 
whether or not the object is currently following its target's rotation
| float MoreMountains.Tools.MMFollowTarget.FollowScaleFactor = 1f | 
the factor to apply to the scale when following
| FollowModes MoreMountains.Tools.MMFollowTarget.FollowScaleMode = FollowModes.MMLerp | 
the follow mode to use when interpolating the scale
| float MoreMountains.Tools.MMFollowTarget.FollowScaleSpeed = 10f | 
the speed at which to interpolate the follower's scale
| bool MoreMountains.Tools.MMFollowTarget.InterpolatePosition = true | 
whether or not we need to interpolate the movement
| bool MoreMountains.Tools.MMFollowTarget.InterpolateRotation = true | 
whether or not we need to interpolate the movement
| bool MoreMountains.Tools.MMFollowTarget.InterpolateScale = true | 
whether or not we need to interpolate the scale
| float MoreMountains.Tools.MMFollowTarget.MaxDistanceToAnchor = 1f | 
the maximum distance around the initial position at which the transform can move
| float MoreMountains.Tools.MMFollowTarget.MaximumDistance = 1f | 
the maximum distance at which the object can be away from its target
| float MoreMountains.Tools.MMFollowTarget.MinimumDistanceBeforeFollow = 1f | 
the minimum distance to keep between the object and its target
| Vector3 MoreMountains.Tools.MMFollowTarget.Offset | 
the offset to apply to the followed target
| PositionSpaces MoreMountains.Tools.MMFollowTarget.PositionSpace = PositionSpaces.World | 
whether to operate in world or local space
| float MoreMountains.Tools.MMFollowTarget.PositionSpringDamping = 0.3f | 
higher values mean more damping, less spring, low values mean less damping, more spring
| float MoreMountains.Tools.MMFollowTarget.PositionSpringFrequency = 3f | 
the frequency at which the spring should "vibrate", in Hz (1 : the spring will do one full period in one second)
| float MoreMountains.Tools.MMFollowTarget.RotationSpringDamping = 0.3f | 
higher values mean more damping, less spring, low values mean less damping, more spring
| float MoreMountains.Tools.MMFollowTarget.RotationSpringFrequency = 3f | 
the frequency at which the spring should "vibrate", in Hz (1 : the spring will do one full period in one second)
| float MoreMountains.Tools.MMFollowTarget.ScaleSpringDamping = 0.3f | 
higher values mean more damping, less spring, low values mean less damping, more spring
| float MoreMountains.Tools.MMFollowTarget.ScaleSpringFrequency = 3f | 
the frequency at which the spring should "vibrate", in Hz (1 : the spring will do one full period in one second)
| Transform MoreMountains.Tools.MMFollowTarget.Target | 
the target to follow
| UpdateModes MoreMountains.Tools.MMFollowTarget.UpdateMode = UpdateModes.Update | 
the update at which the movement happens
| bool MoreMountains.Tools.MMFollowTarget.UseMaximumDistance = false | 
whether or not we want to make sure the object is never too far away from its target
| bool MoreMountains.Tools.MMFollowTarget.UseMinimumDistanceBeforeFollow = false | 
whether or not to force a minimum distance between the object and its target before it starts following
| 
 | getprotected |