From 426d2cfbec967a95fbebd4d7e2d3e03c8b3c9f4e Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 21 Feb 2022 09:56:10 +0800 Subject: + fast IK --- .../FastIK/Scripts/Sample/SampleSinMover.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs (limited to 'JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs') 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); + } + } +} -- cgit v1.1-26-g67d0