Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UCharacterMovementComponentBase 클래스 참조

#include <CharacterMovementComponentBase.h>

UCharacterMovementComponentBase에 대한 상속 다이어그램 :
Inheritance graph
UCharacterMovementComponentBase에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

 UCharacterMovementComponentBase ()
 
bool RotateToActor (AActor *TargetActor, float DeltaTime, float TurnSpeed, float Tolerance, bool bIsSmoothTurn=true)
 
bool RotateToLocation (const FVector &TargetLocation, float DeltaTime, float TurnSpeed, float Tolerance, bool bIsSmoothTurn=true)
 
void BeginManualRotation ()
 
void EndManualRotation ()
 

Protected 멤버 함수

virtual void BeginPlay () override
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 

Private 멤버 함수

bool IsFacingLocation (const FVector &TargetLocation, float Tolerance) const
 
void RestoreManualRotationSettings ()
 

Private 속성

int32 ManualRotationLockCount = 0
 
bool bHasCachedManualRotationSettings = false
 
bool bCachedUseControllerRotationYaw = false
 
bool bCachedOrientRotationToMovement = false
 
bool bCachedUseControllerDesiredRotation = false
 

생성자 & 소멸자 문서화

◆ UCharacterMovementComponentBase()

UCharacterMovementComponentBase::UCharacterMovementComponentBase ( )
12{
13 PrimaryComponentTick.bCanEverTick = true;
14}

멤버 함수 문서화

◆ BeginManualRotation()

void UCharacterMovementComponentBase::BeginManualRotation ( )
109{
111 {
113 return;
114 }
115
116 ACharacter* OwnerCharacter = GetCharacterOwner();
117
118 if (OwnerCharacter == nullptr)
119 {
121 return;
122 }
123
124 bCachedUseControllerRotationYaw = OwnerCharacter->bUseControllerRotationYaw;
125 OwnerCharacter->bUseControllerRotationYaw = false;
126
127 bCachedOrientRotationToMovement = bOrientRotationToMovement;
128 bCachedUseControllerDesiredRotation = bUseControllerDesiredRotation;
129
130 bOrientRotationToMovement = false;
131 bUseControllerDesiredRotation = false;
132
135}
bool bHasCachedManualRotationSettings
Definition CharacterMovementComponentBase.h:42
int32 ManualRotationLockCount
Definition CharacterMovementComponentBase.h:39
bool bCachedOrientRotationToMovement
Definition CharacterMovementComponentBase.h:44
bool bCachedUseControllerDesiredRotation
Definition CharacterMovementComponentBase.h:45
bool bCachedUseControllerRotationYaw
Definition CharacterMovementComponentBase.h:43

다음을 참조함 : bCachedOrientRotationToMovement, bCachedUseControllerDesiredRotation, bCachedUseControllerRotationYaw, bHasCachedManualRotationSettings, ManualRotationLockCount.

다음에 의해서 참조됨 : UAT_EnemyDashMove::Activate(), UAnimNotifyState_RotateToTarget::NotifyBegin(), AMainPlayerCharacter::OnHitStunTagChanged().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ BeginPlay()

void UCharacterMovementComponentBase::BeginPlay ( )
overrideprotectedvirtual
19{
20 Super::BeginPlay();
21}

◆ EndManualRotation()

void UCharacterMovementComponentBase::EndManualRotation ( )
139{
141 {
142 return;
143 }
144
146
148 {
150 }
151}
void RestoreManualRotationSettings()
Definition CharacterMovementComponentBase.cpp:153

다음을 참조함 : ManualRotationLockCount, RestoreManualRotationSettings().

다음에 의해서 참조됨 : UAnimNotifyState_RotateToTarget::NotifyEnd(), AMainPlayerCharacter::OnHitStunTagChanged().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ EndPlay()

void UCharacterMovementComponentBase::EndPlay ( const EEndPlayReason::Type  EndPlayReason)
overrideprotectedvirtual
25{
27
28 Super::EndPlay(EndPlayReason);
29}

다음을 참조함 : RestoreManualRotationSettings().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ IsFacingLocation()

bool UCharacterMovementComponentBase::IsFacingLocation ( const FVector &  TargetLocation,
float  Tolerance 
) const
private
85{
86 const AActor* OwnerActor = GetOwner();
87 if (IsValid(OwnerActor) == false)
88 {
89 return false;
90 }
91
92 FVector LookAtDirection = TargetLocation - OwnerActor->GetActorLocation();
93 LookAtDirection.Z = 0.0f;
94
95 if (LookAtDirection.IsNearlyZero())
96 {
97 return true;
98 }
99
100 const float CurrentYaw = OwnerActor->GetActorRotation().Yaw;
101 const float TargetYaw = LookAtDirection.Rotation().Yaw;
102 const float DeltaYaw = FMath::Abs(FMath::FindDeltaAngleDegrees(CurrentYaw, TargetYaw));
103
104 return DeltaYaw <= Tolerance;
105}

다음에 의해서 참조됨 : RotateToLocation().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RestoreManualRotationSettings()

void UCharacterMovementComponentBase::RestoreManualRotationSettings ( )
private
154{
156 {
158 return;
159 }
160
161 if (ACharacter* OwnerCharacter = GetCharacterOwner())
162 {
163 OwnerCharacter->bUseControllerRotationYaw = bCachedUseControllerRotationYaw;
164 }
165
166 bOrientRotationToMovement = bCachedOrientRotationToMovement;
167 bUseControllerDesiredRotation = bCachedUseControllerDesiredRotation;
168
171}

다음을 참조함 : bCachedOrientRotationToMovement, bCachedUseControllerDesiredRotation, bCachedUseControllerRotationYaw, bHasCachedManualRotationSettings, ManualRotationLockCount.

다음에 의해서 참조됨 : EndManualRotation(), EndPlay().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RotateToActor()

bool UCharacterMovementComponentBase::RotateToActor ( AActor *  TargetActor,
float  DeltaTime,
float  TurnSpeed,
float  Tolerance,
bool  bIsSmoothTurn = true 
)
33{
34 if (IsValid(TargetActor) == false)
35 {
36 return false;
37 }
38
39 return RotateToLocation(TargetActor->GetActorLocation(), DeltaTime, TurnSpeed, Tolerance, bIsSmoothTurn);
40}
bool RotateToLocation(const FVector &TargetLocation, float DeltaTime, float TurnSpeed, float Tolerance, bool bIsSmoothTurn=true)
Definition CharacterMovementComponentBase.cpp:43

다음을 참조함 : RotateToLocation().

다음에 의해서 참조됨 : UAnimNotifyState_RotateToTarget::NotifyTick().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RotateToLocation()

bool UCharacterMovementComponentBase::RotateToLocation ( const FVector &  TargetLocation,
float  DeltaTime,
float  TurnSpeed,
float  Tolerance,
bool  bIsSmoothTurn = true 
)
44{
45 AActor* OwnerActor = GetOwner();
46
47 if (IsValid(OwnerActor) == false)
48 {
49 return false;
50 }
51
52 FVector LookAtDirection = TargetLocation - OwnerActor->GetActorLocation();
53 LookAtDirection.Z = 0.0f;
54
55 if (LookAtDirection.IsNearlyZero())
56 {
57 return true;
58 }
59
60 if (IsFacingLocation(TargetLocation, Tolerance))
61 {
62 return true;
63 }
64
65 const FRotator CurrentRotation = OwnerActor->GetActorRotation();
66 const FRotator TargetRotation = LookAtDirection.Rotation();
67
68 FRotator NewRotation = CurrentRotation;
69
70 if (bIsSmoothTurn)
71 {
72 NewRotation.Yaw = FMath::RInterpTo(CurrentRotation, TargetRotation, DeltaTime, TurnSpeed).Yaw;
73 }
74 else
75 {
76 NewRotation.Yaw = TargetRotation.Yaw;
77 }
78
79 OwnerActor->SetActorRotation(NewRotation);
80 return IsFacingLocation(TargetLocation, Tolerance);
81}
bool IsFacingLocation(const FVector &TargetLocation, float Tolerance) const
Definition CharacterMovementComponentBase.cpp:84

다음을 참조함 : IsFacingLocation().

다음에 의해서 참조됨 : RotateToActor().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ bCachedOrientRotationToMovement

bool UCharacterMovementComponentBase::bCachedOrientRotationToMovement = false
private

다음에 의해서 참조됨 : BeginManualRotation(), RestoreManualRotationSettings().

◆ bCachedUseControllerDesiredRotation

bool UCharacterMovementComponentBase::bCachedUseControllerDesiredRotation = false
private

다음에 의해서 참조됨 : BeginManualRotation(), RestoreManualRotationSettings().

◆ bCachedUseControllerRotationYaw

bool UCharacterMovementComponentBase::bCachedUseControllerRotationYaw = false
private

다음에 의해서 참조됨 : BeginManualRotation(), RestoreManualRotationSettings().

◆ bHasCachedManualRotationSettings

bool UCharacterMovementComponentBase::bHasCachedManualRotationSettings = false
private

다음에 의해서 참조됨 : BeginManualRotation(), RestoreManualRotationSettings().

◆ ManualRotationLockCount

int32 UCharacterMovementComponentBase::ManualRotationLockCount = 0
private

이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: