diff options
| author | chai <chaifix@163.com> | 2022-07-02 18:23:46 +0800 | 
|---|---|---|
| committer | chai <chaifix@163.com> | 2022-07-02 18:23:46 +0800 | 
| commit | f0f1d830651f3737030e258dc86b42a37baa1bca (patch) | |
| tree | 386946c608ec02094c81253872e890615e0c3807 /JamHelper/Assets/JamUtils/FastIK/Scripts/Sample | |
| parent | e7e9156b0e4d180f8f9e291eb5ccfb08847e6269 (diff) | |
* change directory
Diffstat (limited to 'JamHelper/Assets/JamUtils/FastIK/Scripts/Sample')
6 files changed, 0 insertions, 113 deletions
diff --git a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleProcedualAnimation.cs b/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleProcedualAnimation.cs deleted file mode 100644 index 01e38ff..0000000 --- a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleProcedualAnimation.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine; - -namespace DitzelGames.FastIK -{ -    class SampleProcedualAnimation :  MonoBehaviour -    { -        public Transform[] FootTarget; -        public Transform LookTarget; -        public Transform HandTarget; -        public Transform HandPole; -        public Transform Step; -        public Transform Attraction; - -        public void LateUpdate() -        { -            //move step & attraction -            Step.Translate(Vector3.forward * Time.deltaTime * 0.7f); -            if (Step.position.z > 1f) -                Step.position = Step.position + Vector3.forward * -2f; -            Attraction.Translate(Vector3.forward * Time.deltaTime * 0.5f); -            if (Attraction.position.z > 1f) -                Attraction.position = Attraction.position + Vector3.forward * -2f; - -            //footsteps -            for(int i = 0; i < FootTarget.Length; i++) -            { -                var foot = FootTarget[i]; -                var ray = new Ray(foot.transform.position + Vector3.up * 0.5f, Vector3.down); -                var hitInfo = new RaycastHit(); -                if(Physics.SphereCast(ray, 0.05f, out hitInfo, 0.50f)) -                    foot.position = hitInfo.point + Vector3.up * 0.05f; -            } - -            //hand and look -            var normDist = Mathf.Clamp((Vector3.Distance(LookTarget.position, Attraction.position) - 0.3f) / 1f, 0, 1); -            HandTarget.rotation = Quaternion.Lerp(Quaternion.Euler(90, 0, 0), HandTarget.rotation, normDist); -            HandTarget.position = Vector3.Lerp(Attraction.position, HandTarget.position, normDist); -            HandPole.position = Vector3.Lerp(HandTarget.position + Vector3.down * 2, HandTarget.position + Vector3.forward * 2f, normDist); -            LookTarget.position = Vector3.Lerp(Attraction.position, LookTarget.position, normDist); - - -        } - -    } -} diff --git a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleProcedualAnimation.cs.meta b/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleProcedualAnimation.cs.meta deleted file mode 100644 index 7f3ffb6..0000000 --- a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleProcedualAnimation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1c9cd2c593f693345ad26b97d5a0d43f -MonoImporter: -  externalObjects: {} -  serializedVersion: 2 -  defaultReferences: [] -  executionOrder: 100 -  icon: {instanceID: 0} -  userData:  -  assetBundleName:  -  assetBundleVariant:  diff --git a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleRotator.cs b/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleRotator.cs deleted file mode 100644 index 62f201d..0000000 --- a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleRotator.cs +++ /dev/null @@ -1,14 +0,0 @@ -using UnityEngine; - -namespace DitzelGames.FastIK -{ -    public class SampleRotator : MonoBehaviour -    { -         -        void Update() -        { -            //just rotate the object -            transform.Rotate(0, Time.deltaTime * 90, 0); -        } -    } -} diff --git a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleRotator.cs.meta b/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleRotator.cs.meta deleted file mode 100644 index 5fd4b94..0000000 --- a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleRotator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e9a7a99d0dda4cf438c3fd3db6627c08 -MonoImporter: -  externalObjects: {} -  serializedVersion: 2 -  defaultReferences: [] -  executionOrder: 0 -  icon: {instanceID: 0} -  userData:  -  assetBundleName:  -  assetBundleVariant:  diff --git a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs b/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs deleted file mode 100644 index 0607082..0000000 --- a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs +++ /dev/null @@ -1,21 +0,0 @@ -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); -        } -    } -} diff --git a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs.meta b/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs.meta deleted file mode 100644 index 9095f54..0000000 --- a/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bf9a667200f2ae8459b397bc03e59350 -MonoImporter: -  externalObjects: {} -  serializedVersion: 2 -  defaultReferences: [] -  executionOrder: 0 -  icon: {instanceID: 0} -  userData:  -  assetBundleName:  -  assetBundleVariant:   | 
