Vector3 direction = transform.position - other.gameObject.transform.position;
//direction = direction * 1000;
//normalized 를 함으로 벡터의 방향은 그대로 두고 크기만 1.0로 맞춰 주는 것
direction = direction.normalized * 3;
Debug.Log("direction :" + direction);
Target.position = new Vector3(direction.x,0, direction.z);
MoveHandler(this, new EventMove() { TargetPos = direction });
댓글 없음:
댓글 쓰기