LookAt함수에 외적값이 0이 나올 때의 예외처리가 필요함
언리얼 엔진의 예시
FMatrix FRotationMatrix::MakeFromX(FVector const& XAxis) // 카메라로부터 물체까지의 벡터
{
FVector const NewX = XAxis.GetSafeNormal();
// try to use up if possible
FVector const UpVector = ( FMath::Abs(NewX.Z) < (1.f - KINDA_SMALL_NUMBER) ) ? FVector(0,0,1.f) : FVector(1.f,0,0);
const FVector NewY = (UpVector ^ NewX).GetSafeNormal();
const FVector NewZ = NewX ^ NewY;
return FMatrix(NewX, NewY, NewZ, FVector::ZeroVector);
}