분류 전체보기 254

7.애니메이션 시스템의 설계_2)스테이트 머신,점프 구현1

기존 Result의 연결을 끊고 스테이트 머신 새로추가를 해서 Result와 연결해준다 스테이트를 추가하고 이름은 Ground로 해준다 그 다음 Ground로 들어가 아까 한 작업들을 복붙해준다 --------점프 구현------- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include "ABCharacter.h" // Sets default values AABCharacter::AABCharacter() { ... GetCharacterMovement()->JumpZVelocity = 800.0f;//점프 높이를 800으로 설정 } ... // Called to bind functionality to input void AABCharacter::Set..

7.애니메이션 시스템의 설계_1)달리기와 멈춤 애니메이션

새로운 c++클래스에서 AnimInstance 를 선택하고 이름을 ABAnimInstance 라고 지어준다 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 // Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "ArenaBattle.h" // = EngineMinimal.h #include "Animation/AnimInstance.h" #include "ABAnimInstance.generated.h" /** * */ UCLASS() class ARENABATTLE_API UABAnimInstance : publi..

6.캐릭터 제작과 컨트롤_5)컨트롤 방식 변경

프로젝트 세팅>엔진-입력>액션 매핑에서 ViewChange 를 하나 만들고 키에는 Shift+v 를 입력한다 앞으로 Shift+v를 입력하면 GTA 모드와 DIABLO모드가 변경 될 것이다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 // Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "ArenaBattle.h" // = EngineMinimal.h #include "GameFramework/Character.h" #include "ABCharacter.generated.h" UCLASS() class ARE..

6.캐릭터 제작과 컨트롤_4)디아블로방식 컨트롤 구현

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 #pragma once #include "ArenaBattle.h" // = EngineMinimal.h #include "GameFramework/Character.h" #include "ABCharacter.generated.h" UCLASS() class ARENABATTLE_API AABCharacter : public ACharacter { GENERATED_BODY() public: // Sets default values for this cha..

6.캐릭터 제작과 컨트롤_3)GTA방식 컨트롤 구현

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #pragma once ... UCLASS() class ARENABATTLE_API AABCharacter : public ACharacter { ... protected: ... void SetControlMode(int32 ControlMode); ... }; Colored by Color Scripter cs SetControlMode()함수를 만들어 괄호 안의 변수에 따라 게임모드를 바꾸는 기능을 만든다 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #include "ABCharacter.h" // Sets default v..

6.캐릭터 제작과 컨트롤_2)캐릭터 회전

프로젝트 세팅>엔진-입력에서 Turn 과 LookUp를 확인한다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #pragma once #include "ArenaBattle.h" // = EngineMinimal.h #include "GameFramework/Character.h" #include "ABCharacter.generated.h" UCLASS() class ARENABATTLE_API AABCharacter : public ACharacter { ... private: void UpDown(float NewAxisValue); void LeftRight(float NewAxisValue); void LookUp(float NewAxisValue); void..

6.캐릭터의 제작과 컨트롤_1)캐릭터 제작

캐릭터와 폰의 차이점 1.점프와 같은 중력을 반영한 움직임 제공 2.기어가기 날아가기 등 다양한 움직임 설정 가능 3.캐릭터들의 움직임 자동 동기화 디폴트폰이 폰일경우 중력의 영향을 받지 않음 디폴트폰이 캐릭터일경우 중력의 영향을 받음 새로운 클래스에서 Character 를 선택하고 이름은 ABCharater으로 한다 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 // Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "ArenaB..

5. 폰의 제작과 조작_3폰에 애니메이션입히기

폰의 기본 조작과정에서 애니메이션을 입혀본다 애니메이션 블루프린트를 하나 생성하고 이름은 WarriorAnimBlueprint 라고 한다 WarriorAnimBlueprint를 열고 들어가서 WarriorRun을 Result에 연결시키고 저장한다 1 2 3 4 5 6 7 8 9 10 11 12 13 AABPawn::AABPawn() { ... Mesh->SetAnimationMode(EAnimationMode::AnimationBlueprint); static ConstructorHelpers::FClassFinderWARRIOR_ANIM(TEXT("/Game/Book/Animations/WarriorAnimBlueprint.WarriorAnimBlueprint")); if (WARRIOR_ANIM.Su..

5. 폰의 제작과 조작_2폰의조작

언리얼 에디터에서 세팅>프로젝트 세팅>엔진-입력으로 가면 액션 매핑과 축 매핑이 있는것을 볼 수 있다. 축 매핑은 방향전환과 같은 키 설정이고 액션 매핑은 점프나 공격같은 키 설정이다. 축 매핑에 UpDown 과 LeftRight 를 추가하고 UpDown에는 W/S 키를, LeftRight에는 A/D키를 입력한다. 앞과 오른쪽인 W 와 D 에는 스케일에 1값을 , 뒤와 왼쪽인 S 와 A 에는 스케일에 -1값을 넣는다 1 2 3 4 5 6 7 8 9 10 11 class ARENABATTLE_API AABPawn : public APawn { GENERATED_BODY() ... private: void UpDown(float NewAxisValue); void LeftRight(float NewAxisV..

5. 폰의 제작과 조작_1폰제작

새로운 c++클래스에서 Gamemode 를 선택 하고 ABGamemode로 파일을 하나 만든다 그 다음 ABGameMode 에서 사용할 캐릭터 Pawn을 ABPawn을 하나 만들고 ABGameMode에서 사용할 플레이어 컨트롤러를 ABPlayerController로 하나 만들어준다. 그리고 월드 세팅에서 게임모드 오버라이드에서 방금 만든 ABGameMode로 설정한다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 // Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "ArenaBattle.h" #include "GameFr..