Exemplo n.º 1
0
 protected override void Start()
 {
     base.Start();
     path = FindObjectOfType <v2_5DPath>();
     if (path)
     {
         StartCoroutine(InitPath());
     }
 }
Exemplo n.º 2
0
        protected override void FixedUpdate()
        {
            base.FixedUpdate();
            if (!path)
            {
                path = FindObjectOfType <v2_5DPath>();
                if (path)
                {
                    StartCoroutine(InitPath());
                }
            }
            if (!cc.isDead && !cc.ragdolled)
            {
                transform.position = Vector3.Lerp(transform.position, path.ConstraintPosition(transform.position), 80 * Time.deltaTime);
            }

            transform.position = path.ConstraintPosition(transform.position);
        }