폰의 기본 조작과정에서 애니메이션을 입혀본다
애니메이션 블루프린트를 하나 생성하고 이름은 WarriorAnimBlueprint 라고 한다
WarriorAnimBlueprint를 열고 들어가서 WarriorRun을 Result에 연결시키고 저장한다
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<ABPawn.cpp>
AABPawn::AABPawn()
{
...
Mesh->SetAnimationMode(EAnimationMode::AnimationBlueprint);
static ConstructorHelpers::FClassFinder<UAnimInstance>WARRIOR_ANIM(TEXT("/Game/Book/Animations/WarriorAnimBlueprint.WarriorAnimBlueprint"));
if (WARRIOR_ANIM.Succeeded())
{
Mesh->SetAnimInstanceClass(WARRIOR_ANIM.Class);
}
}
|
cs |
WarriorAnimBlueprint 의 경로를 복사하여 WARRIOR_ANIM이라는 변수에 넣고 불러오는데 성공한다면
폰에 WARRIOR_ANIM를 넣는다
컴파일 하고 실행해보면 달리는 달리는 모션이 있는 WARRIOR_ANIM가 디폴트가 된 것을 알 수 있다.
'언리얼 개인 프로젝트 > 언리얼엔진C++ 독학(이득우)' 카테고리의 다른 글
6.캐릭터 제작과 컨트롤_2)캐릭터 회전 (0) | 2022.03.04 |
---|---|
6.캐릭터의 제작과 컨트롤_1)캐릭터 제작 (0) | 2022.03.04 |
5. 폰의 제작과 조작_2폰의조작 (0) | 2022.03.04 |
5. 폰의 제작과 조작_1폰제작 (0) | 2022.03.04 |
3.움직이는 액터의 제작_2 (0) | 2022.03.03 |