빗변의 길이가 1인 직각 삼각형에서 밑변은 cos, 높이는 sin과 같다.
단위원에서 원 위의 점은 P(cos, sin)로 나타낼 수 있다.
점 P에 n을 곱하면 방향으로 n만큼 떨어진 점을 나타내게 된다. (극좌표계)
Vector2 direction = new Vector2(Mathf.Cos(_angle * Mathf.Deg2Rad),
Mathf.Sin(_angle * Mathf.Deg2Rad));
Mathf.Cos, Sin의 파라미터 값은 라디안 값이기 때문에 각도(degree)로 변환하여 사용해야 함
transform.Translate(moveSpeed * direction * Time.deltaTime);
direction 방향으로 moveSpeed의 크기만큼 이동
Time.deltaTime(프레임 간의 시간 차이)을 곱해주어 프레임과 무관하게 동일한 속도로 이동
tempObject.transform.right = direction;
오브젝트의 right(red)축을 direction 방향으로 변경
오브젝트를 rotation 한 것과 동일한 효과
transform.right = arrowRigidbody2D.velocity.normalized;
오브젝트의 방향을 현재 속도의 방향으로 설정