/// /// 속력 = 이동거리 / 걸린시간 /// protected float GetSpeed(Transform objTransform, Vector3 destPos, float tiem = 2.5f) { //방법1 { float dir = Vector3.Distance(objTransform.position, destPos); return (dir / tiem); } //방법2 { Vector3 dir = destPos - objTransform.position; return (dir.magnitude / tiem); } }