Unreal Engine Blueprint & C++ 12

2/10 Unreal Engine C++ Interface, ItemBase class

단축키 F12 (함수에서) : h cpp이동할 영역 선택 + Alt + 방향키 : 순서 이동복사할 영역 선택 + Ctrl + D : DuplicateShift + 방향키 : 영역 선택 Interface   : 순수가상함수를 모아둔 클래스(순수가상함수만 넣어야한다). 기존 변수, 함수 그대로 사용. ex) IC_ItemInterface  virtual void ActivateItem(AActor* Activator) = 0; // 정의 필요  순수가상함수 / 가상함수 virtual Function();  – 가상함수 : 정의 여부 상관 없음. 정의하지 않는 경우 부모 그대로 상속. virtual Function() = 0; – 순수가상함수 : 상속 받는 클래스에서 정의 해야한다. ItemInterface..

2/4 Unreal Engine PlayerController

PlayerController C++ Class새로운 C++ 클래스 생성 - 모든 클래스 - PlayerController   C_PlayerController.h  C_PlayerController.cpp* 전방선언 : 식별자 정의 전, 식별자의 존재를 컴파일러에 미리 알리는 것ex)#include "CoreMinimal.h" #include "GameFramework/PlayerController.h" #include "C_PlayerController.generated.h" class UInputAction; class UInputMappingContext;   Blueprint를 C_PlayerController 기반으로 제작   입력 설정

2/3 Unreal Engine IA, IMC

Input Action(IA) & Input Mapping Context(IMC) IA_Jump       : Space bar에 동작 -> Bool IA_Look      : 마우스 입력 (가로 (x축, 좌우), 세로 (y축, 위아래) -> Axis2D IA_Sprint       : Shift로 속도 제어 -> Bool (On / Off)    입력 - 입력 액션, 입력 - 입력 매핑 컨텍스트   IA_Look, IA_Move의 값 타입 -> Axis2D (Vector2D)    IMC_Pawn 설정 IA_Look -> 마우스 XY 2D 축  IA_Move -> 키보드 입력 설정

1/31 Unreal Engine Pawn Class

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();           FRotator LookRotator = FRotator(LookInput.Y, Lo..

1/30 Unreal Engine Actor (Static Mesh), Pawn Class

StaticMesh Movement 새로운 C++ 클래스 생성 - Actor (Public)  C_Platform.h  C_Platform.cpp  Blueprint를 C_Platform 기반으로 제작 - C++에서 변수 제작 (BPC_Platform_Linear) C++ LinearMovement 함수의 변수 Blueprint에서 같은 이름의 변수 추가- 변수 타입은 C++에서의 변수 타입과 동일 함수와 변수 연결 Starter Location을 Get Actor Location과 연결하여 Set -> BeginPlay로 시작 위치 설정  Static Mesh Component 설정    - Blueprint에서 변수 제작 (BPC_Platform_Rotate)  Blueprint에서 함수, 변수 생성