이 멀티 문자 따르지 공감 카메라를 이동하는 방법입니다. 것은 오래 전에 공유에 뭔가를 추출, 작성
전용 공간 이동 ([] 대상 변환 REF INT 카운트 부울 iscount 아웃)
{
iscount = false;
var relativePos = target[count].position - transform.position;
Quaternion newRotation = Quaternion.LookRotation(relativePos);
transform.rotation = Quaternion.RotateTowards(transform.rotation, newRotation, 80 * Time.deltaTime);
// transform.LookAt(targetpos[count]);
transform.localPosition = Vector3.MoveTowards(transform.localPosition, target[count].position, speed * Time.deltaTime);
if (Vector3.Distance(transform.position, target[count].position) <= 0.1f)
{
iscount = true;
}
if (iscount == true)
{
if (count >= target.Length - 1)
{
isMove = false;
}
count = count + 1;
Debug.Log(count);
iscount = false;
}
}