Unreal Engine Blueprint & C++

1/31 Unreal Engine Pawn Class

DB51 2025. 2. 5. 16:22

Pawn Movement

새로운 C++ 클래스 생성 - Pawn (Public)

 

 

C_Pawn.h

 

 

C_Pawn.cpp

 

 

Blueprint를 C_Pawn 기반으로 제작

 

 

 

Capsule Component와 Skeletal Mesh Component의 Physics를 비활성화

(Physics : 물리법칙, 중력 등)

 

 

 

-----------------------------------


Roll, Pitch, Yaw

 

IA_Look

 

void AC_Pawn::Look(const FInputActionValue& value)

{

           const FVector2D LookInput = value.Get<FVector2D>();

           FRotator LookRotator = FRotator(LookInput.Y, LookInput.X, 0);

           AddActorLocalRotation(LookRotator);

}

 

 

 

언리얼 엔진의 좌표 (Left Handed)

 X - Roll
 Y - Pitch
 Z - Yaw