// Update is called once per frame void Update() { timeCount += Time.deltaTime; if (timeCount > durationTime) { timeCount = 0; transform.position = orginPos; if (meshTrail != null) { // Debug.Log("reset "); meshTrail.Rest(); } } else { rate = timeCount / durationTime; Vector3 tmpPos = Vector3.Lerp(orginPos, desPos, rate) - transform.parent.position; Vector3 tmpDesPos = tmpPos.normalized * Mathf.Lerp(srcRadiu, desRadius, rate); // Debug.Log(radius); transform.position = tmpDesPos + transform.parent.position; //Vector3.Lerp(transform.position, tmpDesPos, Time.deltaTime*10); } }
public void DelayExcuse() { // Debug.Log("coming!!"); isPlay = true; transform.position = desTrans[curIndex].position; if (meshTrail != null) { //Debug.Log("reset "); meshTrail.Rest(); } }