Class FollowPosition
Will make a transform follow a target position.
Namespace: GGL.Components
Assembly: GGL.dll
Syntax
[AddComponentMenu("GG-Library/MISC/Follow Position")]
[HelpURL("https://ggl.yoannhaffner.com/api/GGL.Components.FollowPosition.html")]
public class FollowPosition : MonoBehaviour
Fields
| Edit this page View Sourceflexibility
Declaration
[Range(0, 1)]
[ShowIf("mode", FollowPosition.Mode.LERP)]
public float flexibility
Field Value
Type | Description |
---|---|
float | [LERP MODE ONLY] Flexibility of the bind. 1 will make both positions the same, 0 won't even move... |
maxSpeed
Declaration
[ShowIf("mode", FollowPosition.Mode.LINEAR)]
public float maxSpeed
Field Value
Type | Description |
---|---|
float | [LINEAR MODE ONLY] Max speed of the follow. |
mode
Declaration
public FollowPosition.Mode mode
Field Value
Type | Description |
---|---|
FollowPosition.Mode | See FollowPosition.Mode. |
target
Declaration
public Transform target
Field Value
Type | Description |
---|---|
Transform | Target to follow |