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

#include <PlayerMovementComponent.h>

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

Public 멤버 함수

 UPlayerMovementComponent ()
 
virtual void TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
 
virtual void CalcVelocity (float DeltaTime, float Friction, bool bFluid, float BrakingDeceleration) override
 
virtual float GetMaxSpeed () const override
 
void UpdateMovementInputRotation (const FRotator &MovementInputRotation)
 
void SetLeaningEnabled (bool bEnabled)
 
float GetRunSpeedAlpha () const
 
FORCEINLINE float GetWalkSpeed () const
 
FORCEINLINE float GetRunSpeed () const
 
FORCEINLINE float GetCurrentMovementSpeed () const
 
FORCEINLINE bool IsLeaningEnabled () const
 
FORCEINLINE float GetLeanAngle () const
 
FORCEINLINE void SetLeanAngle (const float Angle)
 
FORCEINLINE float GetLeaningVelocity () const
 
FORCEINLINE void SetExtraVelocity (const FVector &NewExtraVelocity)
 
- UCharacterMovementComponentBase(으)로부터 상속된 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 FRotator ComputeOrientToMovementRotation (const FRotator &CurrentRotation, float DeltaTime, FRotator &DeltaRotation) const override
 
virtual FVector CalcAnimRootMotionVelocity (const FVector &RootMotionDeltaMove, float DeltaSeconds, const FVector &CurrentVelocity) const override
 
virtual void PhysicsRotation (float DeltaTime) override
 
float CalculateTargetLeanAngle (float DeltaTime, bool bIsMoved) const
 
void UpdateLeaning (float DeltaTime, bool bIsMoved)
 
FORCEINLINE void ResetMovementInputRotation ()
 
FORCEINLINE float GetAppliedMovementInputYawDelta () const
 
- UCharacterMovementComponentBase(으)로부터 상속된 Protected 멤버 함수
virtual void BeginPlay () override
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 

Protected 속성

float MaxRunSpeed = 800.0f
 
FRuntimeFloatCurve MovementSpeedCurve
 
float CameraRotationFollowRatio = 1.0f
 
FRuntimeFloatCurve TurnRateCurve
 
bool bLeaningEnabled = true
 
bool bBlockLean = false
 
bool bShouldResetRotationOnBlock = true
 
float TiltStrength = 12.0f
 
float TiltSmoothTime = 0.17f
 
float CameraLeanYawSpeedForMaxAngle = 360.0f
 
float MovementLeanYawSpeedForMaxAngle = 70.0f
 
float MovementThreshold = 1.0f
 
float RootMotionInertiaBlendOutDuration = 0.1f
 
FVector ExtraVelocity = FVector::ZeroVector
 

Private 속성

float CurrentMovementSpeed = 0.0f
 
float LeanAngle = 0.0f
 
float AppliedCameraYawDelta = 0.0f
 
float AppliedMovementYawDelta = 0.0f
 
float CameraFollowYawSpeed = 0.0f
 
float MovementInputYawDelta = 0.0f
 
float LastActorYaw = 0.0f
 
float LastMovementInputYaw = 0.0f
 
float LeaningVelocity = 0.0f
 
bool bHasMovementInputRotation = false
 
bool bHasLastActorYaw = false
 

생성자 & 소멸자 문서화

◆ UPlayerMovementComponent()

UPlayerMovementComponent::UPlayerMovementComponent ( )
11{
12 FRichCurve* MovementSpeedCurveData = MovementSpeedCurve.GetRichCurve();
13 MovementSpeedCurveData->AddKey(0.0f, 1.0f);
14 MovementSpeedCurveData->AddKey(1.0f, MaxRunSpeed / FMath::Max(MaxWalkSpeed, KINDA_SMALL_NUMBER));
15
16 FRichCurve* TurnRateCurveData = TurnRateCurve.GetRichCurve();
17 TurnRateCurveData->AddKey(0.0f, 3600.0f);
18 TurnRateCurveData->AddKey(1.0f, 180.0f);
19
20 bOrientRotationToMovement = true;
21}
FRuntimeFloatCurve TurnRateCurve
Definition PlayerMovementComponent.h:126
float MaxRunSpeed
Definition PlayerMovementComponent.h:105
FRuntimeFloatCurve MovementSpeedCurve
Definition PlayerMovementComponent.h:112

다음을 참조함 : MaxRunSpeed, MovementSpeedCurve, TurnRateCurve.

멤버 함수 문서화

◆ CalcAnimRootMotionVelocity()

FVector UPlayerMovementComponent::CalcAnimRootMotionVelocity ( const FVector &  RootMotionDeltaMove,
float  DeltaSeconds,
const FVector &  CurrentVelocity 
) const
overrideprotectedvirtual
169{
170 FVector RootMotionVelocity = Super::CalcAnimRootMotionVelocity(RootMotionDeltaMove, DeltaSeconds, CurrentVelocity);
171
172 // 관성은 XY에만 더하고 Root Motion의 Z 속도는 원본을 유지한다.
173 RootMotionVelocity.X += ExtraVelocity.X;
174 RootMotionVelocity.Y += ExtraVelocity.Y;
175 return RootMotionVelocity;
176}
FVector ExtraVelocity
Definition PlayerMovementComponent.h:166

다음을 참조함 : ExtraVelocity.

◆ CalculateTargetLeanAngle()

float UPlayerMovementComponent::CalculateTargetLeanAngle ( float  DeltaTime,
bool  bIsMoved 
) const
protected
245{
246 if (!bIsMoved || !CharacterOwner)
247 {
248 return 0.0f;
249 }
250
251 const float CameraLeanAlpha = Math::CalculateRateAlphaFromDelta(AppliedCameraYawDelta, DeltaTime, CameraLeanYawSpeedForMaxAngle);
252 const float MovementLeanAlpha = Math::CalculateRateAlphaFromDelta(AppliedMovementYawDelta, DeltaTime, MovementLeanYawSpeedForMaxAngle);
253
254 // 카메라 미세 흔들림 같은 약한 신호가 더 강한 이동 회전 신호를 매 프레임 밀어내지 않도록, 둘 중 더 강한 쪽을 적용한다.
255 if (CameraLeanAlpha >= MovementLeanAlpha)
256 {
257 return AppliedCameraYawDelta > 0.0f ? TiltStrength * CameraLeanAlpha : -TiltStrength * CameraLeanAlpha;
258 }
259 else
260 {
261 return AppliedMovementYawDelta > 0.0f ? TiltStrength * MovementLeanAlpha : -TiltStrength * MovementLeanAlpha;
262 }
263}
float TiltStrength
Definition PlayerMovementComponent.h:145
float AppliedMovementYawDelta
Definition PlayerMovementComponent.h:177
float AppliedCameraYawDelta
Definition PlayerMovementComponent.h:176
float CameraLeanYawSpeedForMaxAngle
Definition PlayerMovementComponent.h:152
float MovementLeanYawSpeedForMaxAngle
Definition PlayerMovementComponent.h:156

다음을 참조함 : AppliedCameraYawDelta, AppliedMovementYawDelta, CameraLeanYawSpeedForMaxAngle, MovementLeanYawSpeedForMaxAngle, TiltStrength.

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

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

◆ CalcVelocity()

void UPlayerMovementComponent::CalcVelocity ( float  DeltaTime,
float  Friction,
bool  bFluid,
float  BrakingDeceleration 
)
overridevirtual
82{
83 const bool bHasMovementInput = Acceleration.SizeSquared2D() > 0.0f;
84
85 if (bHasMovementInput == false)
86 {
88 }
89
90 if (HasValidData() == false || HasAnimRootMotion() || IsMovingOnGround() == false || bFluid)
91 {
92 Super::CalcVelocity(DeltaTime, Friction, bFluid, BrakingDeceleration);
93 return;
94 }
95
96 if (bHasMovementInput == false)
97 {
98 ApplyVelocityBraking(DeltaTime, 0.0f, BrakingDeceleration);
99 return;
100 }
101
102 const float MaximumAcceleration = GetMaxAcceleration();
103 const float InputStrength = MaximumAcceleration > 0.0f ? FMath::Clamp(Acceleration.Size2D() / MaximumAcceleration, 0.0f, 1.0f) : 1.0f;
104
105 const FVector InputDirection = Acceleration.GetSafeNormal2D();
106 const FVector SurfaceVelocity(Velocity.X, Velocity.Y, 0.0f);
107 const float CurrentSurfaceSpeed = SurfaceVelocity.Size2D();
108 const FVector CurrentDirection = CurrentSurfaceSpeed > KINDA_SMALL_NUMBER ? SurfaceVelocity / CurrentSurfaceSpeed : InputDirection;
109
110 const float MaximumMovementSpeed = GetRunSpeed();
111 const float NormalizedSpeed = MaximumMovementSpeed > KINDA_SMALL_NUMBER
112 ? FMath::Clamp(CurrentSurfaceSpeed / MaximumMovementSpeed, 0.0f, 1.0f)
113 : 0.0f;
114
115 // 속도 벡터를 입력 방향으로 최대 각속도(커브 + 카메라 예산)만큼 회전시킨다.
116 // 저속에서는 각속도가 커서 몇 틱 안에 입력 방향에 정렬되고, 고속에서는 각속도가 제한되어 여러 틱에 걸쳐 서서히 정렬된다.
117 const float MaxTurnRateDegrees = FMath::Max(TurnRateCurve.GetRichCurveConst()->Eval(NormalizedSpeed, 0.0f), 0.0f);
118 const float AngleToTarget = Math::CalculateSignedAngleDegrees2D(CurrentDirection, InputDirection);
119 const float TurnStep = FMath::Clamp(AngleToTarget, -MaxTurnRateDegrees * DeltaTime, MaxTurnRateDegrees * DeltaTime);
120 const FVector NewDirection = CurrentDirection.RotateAngleAxis(TurnStep, FVector::UpVector);
121
122 // 방향 정렬 후에도 남은 각도가 클수록(코너가 급할수록) 목표 속도를 깎는다. 완전 반대 방향이면 목표 속도가 0이 된다.
123 const float RemainingAngle = AngleToTarget - TurnStep;
124 const float SpeedScale = FMath::Clamp(FMath::Cos(FMath::DegreesToRadians(RemainingAngle)), 0.0f, 1.0f);
125 const float TargetTopSpeed = GetMaxSpeed() * InputStrength * SpeedScale;
126
127 float NewSpeed = CurrentSurfaceSpeed;
128
129 if (NewSpeed < TargetTopSpeed)
130 {
131 NewSpeed = FMath::Min(NewSpeed + MaximumAcceleration * DeltaTime, TargetTopSpeed);
132 }
133 else
134 {
135 NewSpeed = FMath::FInterpConstantTo(NewSpeed, TargetTopSpeed, DeltaTime, BrakingDeceleration);
136 }
137
138 const FVector NewSurfaceVelocity = NewDirection * NewSpeed;
139
140 Velocity.X = NewSurfaceVelocity.X;
141 Velocity.Y = NewSurfaceVelocity.Y;
142}
FORCEINLINE float GetRunSpeed() const
Definition PlayerMovementComponent.h:39
virtual float GetMaxSpeed() const override
Definition PlayerMovementComponent.cpp:145
FORCEINLINE void ResetMovementInputRotation()
Definition PlayerMovementComponent.h:89

다음을 참조함 : GetMaxSpeed(), GetRunSpeed(), ResetMovementInputRotation(), TurnRateCurve.

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

◆ ComputeOrientToMovementRotation()

FRotator UPlayerMovementComponent::ComputeOrientToMovementRotation ( const FRotator &  CurrentRotation,
float  DeltaTime,
FRotator &  DeltaRotation 
) const
overrideprotectedvirtual
215{
216 const FRotator DesiredRotation = Super::ComputeOrientToMovementRotation(CurrentRotation, DeltaTime, DeltaRotation);
217
218 if (IsMovingOnGround() == false)
219 {
220 return DesiredRotation;
221 }
222
223 // 저속에서는 속도 방향이 노이즈에 좌우되므로 현재 바라보는 방향을 유지한다.
224 if (Velocity.SizeSquared2D() <= FMath::Square(MovementThreshold))
225 {
226 return CurrentRotation;
227 }
228
229 // 몸은 속도 방향을 목표로 하되, 한 틱 회전량 제한은 RotationRate(DeltaRotation)에 맡긴다.
230 // 반전 입력으로 속도 방향이 한 틱에 뒤집혀도 몸이 즉시 스냅하지 않는다.
231 return Velocity.GetSafeNormal2D().Rotation();
232}
float MovementThreshold
Definition PlayerMovementComponent.h:160

다음을 참조함 : MovementThreshold.

◆ GetAppliedMovementInputYawDelta()

FORCEINLINE float UPlayerMovementComponent::GetAppliedMovementInputYawDelta ( ) const
inlineprotected
98 {
99 return MovementInputYawDelta * FMath::Clamp(CameraRotationFollowRatio, 0.0f, 1.0f);
100 }
float CameraRotationFollowRatio
Definition PlayerMovementComponent.h:116
float MovementInputYawDelta
Definition PlayerMovementComponent.h:179

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

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

◆ GetCurrentMovementSpeed()

FORCEINLINE float UPlayerMovementComponent::GetCurrentMovementSpeed ( ) const
inline
46 {
48 }
float CurrentMovementSpeed
Definition PlayerMovementComponent.h:170

◆ GetLeanAngle()

FORCEINLINE float UPlayerMovementComponent::GetLeanAngle ( ) const
inline
58 {
59 return LeanAngle;
60 }
float LeanAngle
Definition PlayerMovementComponent.h:173

◆ GetLeaningVelocity()

FORCEINLINE float UPlayerMovementComponent::GetLeaningVelocity ( ) const
inline
70 {
71 return LeaningVelocity;
72 }
float LeaningVelocity
Definition PlayerMovementComponent.h:182

◆ GetMaxSpeed()

float UPlayerMovementComponent::GetMaxSpeed ( ) const
overridevirtual
146{
147 const float ParentMaxSpeed = Super::GetMaxSpeed();
148
149 if (IsMovingOnGround())
150 {
151 const float MaximumMovementSpeed = GetRunSpeed();
152 const float NormalizedSpeed = MaximumMovementSpeed > KINDA_SMALL_NUMBER
153 ? FMath::Clamp(Velocity.Size2D() / MaximumMovementSpeed, 0.0f, 1.0f)
154 : 0.0f;
155
156 const FRichCurve* MovementSpeedCurveData = MovementSpeedCurve.GetRichCurveConst();
157 const float SpeedMultiplier = FMath::Max(MovementSpeedCurveData->Eval(NormalizedSpeed, 1.0f), 0.0f);
158
159 return ParentMaxSpeed * SpeedMultiplier;
160 }
161 else
162 {
163 return ParentMaxSpeed;
164 }
165}

다음을 참조함 : GetRunSpeed(), MovementSpeedCurve.

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

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

◆ GetRunSpeed()

FORCEINLINE float UPlayerMovementComponent::GetRunSpeed ( ) const
inline
40 {
41 return MaxRunSpeed;
42 }

다음에 의해서 참조됨 : CalcVelocity(), GetMaxSpeed(), GetRunSpeedAlpha().

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

◆ GetRunSpeedAlpha()

float UPlayerMovementComponent::GetRunSpeedAlpha ( ) const
199{
200 const float RunTopSpeed = GetRunSpeed();
201 const float RunSpeedRange = RunTopSpeed - MaxWalkSpeed;
202
203 if (RunSpeedRange < KINDA_SMALL_NUMBER)
204 {
205 return CurrentMovementSpeed > MaxWalkSpeed ? 1.0f : 0.0f;
206 }
207 else
208 {
209 return FMath::Clamp((CurrentMovementSpeed - MaxWalkSpeed) / RunSpeedRange, 0.0f, 1.0f);
210 }
211}

다음을 참조함 : CurrentMovementSpeed, GetRunSpeed().

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

◆ GetWalkSpeed()

FORCEINLINE float UPlayerMovementComponent::GetWalkSpeed ( ) const
inline
34 {
35 return MaxWalkSpeed;
36 }

◆ IsLeaningEnabled()

FORCEINLINE bool UPlayerMovementComponent::IsLeaningEnabled ( ) const
inline
52 {
53 return bLeaningEnabled;
54 }
bool bLeaningEnabled
Definition PlayerMovementComponent.h:135

◆ PhysicsRotation()

void UPlayerMovementComponent::PhysicsRotation ( float  DeltaTime)
overrideprotectedvirtual
236{
239
240 Super::PhysicsRotation(DeltaTime);
241}
FORCEINLINE float GetAppliedMovementInputYawDelta() const
Definition PlayerMovementComponent.h:97

다음을 참조함 : AppliedCameraYawDelta, GetAppliedMovementInputYawDelta(), MovementInputYawDelta.

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

◆ ResetMovementInputRotation()

FORCEINLINE void UPlayerMovementComponent::ResetMovementInputRotation ( )
inlineprotected
90 {
95 }
float CameraFollowYawSpeed
Definition PlayerMovementComponent.h:178
float LastMovementInputYaw
Definition PlayerMovementComponent.h:181
bool bHasMovementInputRotation
Definition PlayerMovementComponent.h:184

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

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

◆ SetExtraVelocity()

FORCEINLINE void UPlayerMovementComponent::SetExtraVelocity ( const FVector &  NewExtraVelocity)
inline
76 {
77 ExtraVelocity = NewExtraVelocity;
78 }

◆ SetLeanAngle()

FORCEINLINE void UPlayerMovementComponent::SetLeanAngle ( const float  Angle)
inline
64 {
65 LeanAngle = Angle;
66 }

◆ SetLeaningEnabled()

void UPlayerMovementComponent::SetLeaningEnabled ( bool  bEnabled)
180{
181 if (bLeaningEnabled == bEnabled)
182 {
183 return;
184 }
185
186 bLeaningEnabled = bEnabled;
187
188 if (bEnabled)
189 {
190 return;
191 }
192
193 LeanAngle = 0.0f;
194 LeaningVelocity = 0.0f;
195}

다음을 참조함 : bLeaningEnabled, LeanAngle, LeaningVelocity.

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

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

◆ TickComponent()

void UPlayerMovementComponent::TickComponent ( float  DeltaTime,
ELevelTick  TickType,
FActorComponentTickFunction *  ThisTickFunction 
)
overridevirtual
42{
45 Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
46 CurrentMovementSpeed = Velocity.Size2D();
47 ExtraVelocity = FMath::VInterpTo(ExtraVelocity, FVector::ZeroVector, DeltaTime, 1.0f / RootMotionInertiaBlendOutDuration);
48
49 if (CharacterOwner != nullptr)
50 {
51 const float NewActorYaw = CharacterOwner->GetActorRotation().Yaw;
52
54 {
55 AppliedMovementYawDelta = FRotator::NormalizeAxis(NewActorYaw - LastActorYaw);
56 }
57
58 LastActorYaw = NewActorYaw;
59 bHasLastActorYaw = true;
60 }
61
62 if (bLeaningEnabled == false)
63 {
64 return;
65 }
66
67 if (bBlockLean == false && IsMovingOnGround())
68 {
69 const bool bIsMoved = Velocity.SizeSquared2D() > FMath::Square(MovementThreshold);
70 UpdateLeaning(DeltaTime, bIsMoved);
71 return;
72 }
73
74 if (bShouldResetRotationOnBlock && FMath::Abs(LeanAngle) > 0.0f)
75 {
76 UpdateLeaning(DeltaTime, false);
77 }
78}
float RootMotionInertiaBlendOutDuration
Definition PlayerMovementComponent.h:163
void UpdateLeaning(float DeltaTime, bool bIsMoved)
Definition PlayerMovementComponent.cpp:266
bool bBlockLean
Definition PlayerMovementComponent.h:138
bool bHasLastActorYaw
Definition PlayerMovementComponent.h:185
float LastActorYaw
Definition PlayerMovementComponent.h:180
bool bShouldResetRotationOnBlock
Definition PlayerMovementComponent.h:141

다음을 참조함 : AppliedCameraYawDelta, AppliedMovementYawDelta, bBlockLean, bHasLastActorYaw, bLeaningEnabled, bShouldResetRotationOnBlock, CurrentMovementSpeed, ExtraVelocity, LastActorYaw, LeanAngle, MovementThreshold, RootMotionInertiaBlendOutDuration, UpdateLeaning().

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

◆ UpdateLeaning()

void UPlayerMovementComponent::UpdateLeaning ( float  DeltaTime,
bool  bIsMoved 
)
protected
267{
268 LeanAngle = Math::SmoothDampAngle(LeanAngle, CalculateTargetLeanAngle(DeltaTime, bIsMoved), LeaningVelocity, TiltSmoothTime, DeltaTime);
269}
float CalculateTargetLeanAngle(float DeltaTime, bool bIsMoved) const
Definition PlayerMovementComponent.cpp:244
float TiltSmoothTime
Definition PlayerMovementComponent.h:148

다음을 참조함 : CalculateTargetLeanAngle(), LeanAngle, LeaningVelocity, TiltSmoothTime.

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

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

◆ UpdateMovementInputRotation()

void UPlayerMovementComponent::UpdateMovementInputRotation ( const FRotator &  MovementInputRotation)
25{
26 const float NewMovementInputYaw = FRotator::NormalizeAxis(MovementInputRotation.Yaw);
27
28 if (bHasMovementInputRotation == false)
29 {
30 LastMovementInputYaw = NewMovementInputYaw;
33 return;
34 }
35
36 MovementInputYawDelta = FRotator::NormalizeAxis(NewMovementInputYaw - LastMovementInputYaw);
37 LastMovementInputYaw = NewMovementInputYaw;
38}

다음을 참조함 : bHasMovementInputRotation, LastMovementInputYaw, MovementInputYawDelta.

멤버 데이터 문서화

◆ AppliedCameraYawDelta

float UPlayerMovementComponent::AppliedCameraYawDelta = 0.0f
private

다음에 의해서 참조됨 : CalculateTargetLeanAngle(), PhysicsRotation(), TickComponent().

◆ AppliedMovementYawDelta

float UPlayerMovementComponent::AppliedMovementYawDelta = 0.0f
private

다음에 의해서 참조됨 : CalculateTargetLeanAngle(), TickComponent().

◆ bBlockLean

bool UPlayerMovementComponent::bBlockLean = false
protected

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

◆ bHasLastActorYaw

bool UPlayerMovementComponent::bHasLastActorYaw = false
private

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

◆ bHasMovementInputRotation

bool UPlayerMovementComponent::bHasMovementInputRotation = false
private

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

◆ bLeaningEnabled

bool UPlayerMovementComponent::bLeaningEnabled = true
protected

다음에 의해서 참조됨 : SetLeaningEnabled(), TickComponent().

◆ bShouldResetRotationOnBlock

bool UPlayerMovementComponent::bShouldResetRotationOnBlock = true
protected

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

◆ CameraFollowYawSpeed

float UPlayerMovementComponent::CameraFollowYawSpeed = 0.0f
private

◆ CameraLeanYawSpeedForMaxAngle

float UPlayerMovementComponent::CameraLeanYawSpeedForMaxAngle = 360.0f
protected

이 카메라 Yaw 속도에서 카메라 회전 Lean이 최대 각도에 도달한다. 0이면 회전 중 즉시 최대 각도를 적용한다.

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

◆ CameraRotationFollowRatio

float UPlayerMovementComponent::CameraRotationFollowRatio = 1.0f
protected

카메라 기준 Yaw 변화량을 Lean에 반영하는 비율

◆ CurrentMovementSpeed

float UPlayerMovementComponent::CurrentMovementSpeed = 0.0f
private

다음에 의해서 참조됨 : GetRunSpeedAlpha(), TickComponent().

◆ ExtraVelocity

FVector UPlayerMovementComponent::ExtraVelocity = FVector::ZeroVector
protected

다음에 의해서 참조됨 : CalcAnimRootMotionVelocity(), TickComponent().

◆ LastActorYaw

float UPlayerMovementComponent::LastActorYaw = 0.0f
private

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

◆ LastMovementInputYaw

float UPlayerMovementComponent::LastMovementInputYaw = 0.0f
private

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

◆ LeanAngle

float UPlayerMovementComponent::LeanAngle = 0.0f
private

다음에 의해서 참조됨 : SetLeaningEnabled(), TickComponent(), UpdateLeaning().

◆ LeaningVelocity

float UPlayerMovementComponent::LeaningVelocity = 0.0f
private

다음에 의해서 참조됨 : SetLeaningEnabled(), UpdateLeaning().

◆ MaxRunSpeed

float UPlayerMovementComponent::MaxRunSpeed = 800.0f
protected

달리기 최고 속도. MaxWalkSpeed(걷기 속도)에서 이 속도까지 가속한다.

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

◆ MovementInputYawDelta

float UPlayerMovementComponent::MovementInputYawDelta = 0.0f
private

다음에 의해서 참조됨 : PhysicsRotation(), UpdateMovementInputRotation().

◆ MovementLeanYawSpeedForMaxAngle

float UPlayerMovementComponent::MovementLeanYawSpeedForMaxAngle = 70.0f
protected

이 실제 이동 Yaw 속도에서 키보드 회전 Lean이 최대 각도에 도달한다. 0이면 회전 중 즉시 최대 각도를 적용한다.

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

◆ MovementSpeedCurve

FRuntimeFloatCurve UPlayerMovementComponent::MovementSpeedCurve
protected

X축 정규화 이동 속도(0~1, MaxRunSpeed 대비)를 Y축 MaxWalkSpeed에 곱할 속도 배율로 변환한다. Y=1이면 MaxWalkSpeed, Y=MaxRunSpeed/MaxWalkSpeed면 MaxRunSpeed에 도달한다.

다음에 의해서 참조됨 : GetMaxSpeed(), UPlayerMovementComponent().

◆ MovementThreshold

float UPlayerMovementComponent::MovementThreshold = 1.0f
protected

이동 중으로 판단할 수평 속도 임계값

다음에 의해서 참조됨 : ComputeOrientToMovementRotation(), TickComponent().

◆ RootMotionInertiaBlendOutDuration

float UPlayerMovementComponent::RootMotionInertiaBlendOutDuration = 0.1f
protected

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

◆ TiltSmoothTime

float UPlayerMovementComponent::TiltSmoothTime = 0.17f
protected

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

◆ TiltStrength

float UPlayerMovementComponent::TiltStrength = 12.0f
protected

회전 방향 쪽으로 기울어지는 최대 각도. 실제로는 +TiltStrength(오른쪽 회전) / -TiltStrength(왼쪽 회전)로 적용된다.

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

◆ TurnRateCurve

FRuntimeFloatCurve UPlayerMovementComponent::TurnRateCurve
protected

X축 정규화 이동 속도(0~1, 최대 이동 속도 대비)를 Y축 최대 방향 전환 각속도(deg/s)로 변환한다. 매 틱 속도 벡터를 입력 방향으로 이 각속도만큼 회전시키고, 아직 남은 각도가 클수록(코너가 급할수록) 목표 속도를 cos(남은 각도)만큼 깎는다. 값이 크면(저속) 몇 틱 안에 정렬이 끝나 감속 후 제자리 회전처럼 보이고, 값이 작으면(고속) 정렬에 여러 틱이 걸려 그 사이 감속되며 호를 그리는 코너가 된다. 정반대 방향 입력도 각도(180도)만 다를 뿐 동일한 수식으로 처리되어 고속에서는 유턴 코너가 된다.

다음에 의해서 참조됨 : CalcVelocity(), UPlayerMovementComponent().


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