diff options
author | chai <chaifix@163.com> | 2022-02-21 09:56:10 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-02-21 09:56:10 +0800 |
commit | 426d2cfbec967a95fbebd4d7e2d3e03c8b3c9f4e (patch) | |
tree | e8d213e88a7876c54bc332efe6fc446f8a7190b3 /JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs | |
parent | ea057c3128ee93a9c5ca606e39d547ee0cadb44f (diff) |
+ fast IK
Diffstat (limited to 'JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs')
-rw-r--r-- | JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs b/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs new file mode 100644 index 0000000..0607082 --- /dev/null +++ b/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs @@ -0,0 +1,21 @@ +using UnityEngine; + +namespace DitzelGames.FastIK +{ + public class SampleSinMover : MonoBehaviour + { + public Vector3 Dir; + public Vector3 Start; + + private void Awake() + { + Start = transform.position; + } + + void Update() + { + //just move the object from a to b and back + transform.position = Start + Dir * Mathf.Sin(Time.timeSinceLevelLoad); + } + } +} |