안선생의 개발 블로그
언리얼 백터의 축 회전 RotateAngleAxis() 본문
RotateAngleAxis( const float AngleDeg, const FVector & Axis)
AngleDeg | 회전할 각도(도 단위). |
Axis | 회전할 축입니다. |
ex
const FVector MeshForward = GetItemMesh()->GetForwardVector();
const FVector MeshRight = GetItemMesh()->GetRightVector();
//앞축 방향으로 -20 회전시킴
FVector ImpulseDirection = MeshRight.RotateAngleAxis(-20.f, MeshForward);
//z축 기준으로 30도 회전 즉 오른쪽방향으로 횐전함
ImpulseDirection = ImpulseDirection.RotateAngleAxis(30.f, FVector(0.f, 0.f, 1.f));
ImpulseDirection *= 20'000.f;
'언리얼' 카테고리의 다른 글
UGameplayStatics::GetAllActorsOfClass (0) | 2023.09.01 |
---|---|
언리얼 time remaining(ratio) (0) | 2023.07.24 |
애님 몽타주 팁 (0) | 2023.07.15 |
언리얼 무기 장착 분리 함수 (0) | 2023.06.24 |
언리얼5 게임화면에서 보이는 액터나 캐릭터 안보이게 하기 (0) | 2023.05.12 |