예제 #1
0
    // Update is called once per frame
    void Update()
    {
        switch (tracking)
        {
        case Tracking.Immediate:
            MathsUtils.FollowImmediate(transform, target.position);
            break;

        case Tracking.Delayed:
            MathsUtils.FollowDelayed(transform, target.position, speed);
            break;

        case Tracking.ImmediateHorizontal:
            MathsUtils.FollowImmediateHorizontal(transform, target.position);
            break;

        case Tracking.DelayedHorizontal:
            MathsUtils.FollowDelayedHorizontal(transform, target.position, speed);
            break;
        }
    }