aboutsummaryrefslogtreecommitdiff
path: root/JamHelper/Assets/JamUtils/FastIK/Scripts/Sample/SampleSinMover.cs
blob: 060708273279f5821521fdb50689a276dfec6907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
        }
    }
}