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

#include <ProjectileMovementParabolic.h>

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

Public 멤버 함수

virtual void Activate (const FVector &InStart, const FVector &InTarget) override
 
virtual bool Simulate (float InDeltaTime, AActor *InOwner) override
 
virtual float GetProjectileDuration () const override
 
- UProjectileMovementBase(으)로부터 상속된 Public 멤버 함수
FORCEINLINE FVector GetCurrentVelocity () const
 

Public 속성

TObjectPtr< UCurveFloat > PositionCurve
 
float Duration = 1.f
 
float ArcHeight = 300.f
 
- UProjectileMovementBase(으)로부터 상속된 Public 속성
virtual void virtual Activate(const FVector &InStart, const FVector &InDirectionOrTarget) PURE_VIRTUAL(UProjectileMovementBase bool Simulate (float InDeltaTime, AActor *InOwner) PURE_VIRTUAL(UProjectileMovementBase
 

Private 속성

FVector StartLocation = FVector::ZeroVector
 
FVector EndLocation = FVector::ZeroVector
 
float TotalTime = 1.f
 
float ElapsedTime = 0.f
 
float ActiveArcHeight = 0.f
 

추가로 상속된 멤버들

- UProjectileMovementBase(으)로부터 상속된 Protected 속성
FVector CurrentVelocity = FVector::ZeroVector
 

멤버 함수 문서화

◆ Activate()

void UProjectileMovementParabolicInterp::Activate ( const FVector &  InStart,
const FVector &  InTarget 
)
overridevirtual
46{
47 StartLocation = InStart;
48 EndLocation = InTarget;
49 TotalTime = FMath::Max(Duration, KINDA_SMALL_NUMBER);
50 ElapsedTime = 0.f;
52 CurrentVelocity = FVector::ZeroVector;
53}
FVector CurrentVelocity
Definition ProjectileMovementBase.h:28
float ArcHeight
Definition ProjectileMovementParabolic.h:59
float TotalTime
Definition ProjectileMovementParabolic.h:64
float ElapsedTime
Definition ProjectileMovementParabolic.h:65
float ActiveArcHeight
Definition ProjectileMovementParabolic.h:66
FVector StartLocation
Definition ProjectileMovementParabolic.h:62
float Duration
Definition ProjectileMovementParabolic.h:56
FVector EndLocation
Definition ProjectileMovementParabolic.h:63

◆ GetProjectileDuration()

virtual float UProjectileMovementParabolicInterp::GetProjectileDuration ( ) const
inlineoverridevirtual

UProjectileMovementBase(으)로부터 재구현되었습니다.

49{ return Duration; }

◆ Simulate()

bool UProjectileMovementParabolicInterp::Simulate ( float  InDeltaTime,
AActor *  InOwner 
)
overridevirtual
57{
58 ElapsedTime += InDeltaTime;
59 const float Alpha = FMath::Clamp(ElapsedTime / TotalTime, 0.f, 1.f);
60
61 if (Alpha > (1.0f - KINDA_SMALL_NUMBER))
62 {
63 CurrentVelocity = FVector::ZeroVector;
64 InOwner->SetActorLocation(EndLocation, false);
65 return true;
66 }
67
68 const float CurveAlpha = PositionCurve ? PositionCurve->GetFloatValue(Alpha) : Alpha;
69 FVector NewLocation = FMath::Lerp(StartLocation, EndLocation, CurveAlpha);
70 NewLocation.Z += FMath::Sin(CurveAlpha * PI) * ActiveArcHeight;
71
72 const FVector PrevLocation = InOwner->GetActorLocation();
73 InOwner->SetActorLocation(NewLocation, true);
74
75 const FVector TravelDir = NewLocation - PrevLocation;
76 CurrentVelocity = TravelDir / InDeltaTime;
77
78 return false;
79}
TObjectPtr< UCurveFloat > PositionCurve
Definition ProjectileMovementParabolic.h:53

멤버 데이터 문서화

◆ ActiveArcHeight

float UProjectileMovementParabolicInterp::ActiveArcHeight = 0.f
private

◆ ArcHeight

float UProjectileMovementParabolicInterp::ArcHeight = 300.f

◆ Duration

float UProjectileMovementParabolicInterp::Duration = 1.f

◆ ElapsedTime

float UProjectileMovementParabolicInterp::ElapsedTime = 0.f
private

◆ EndLocation

FVector UProjectileMovementParabolicInterp::EndLocation = FVector::ZeroVector
private

◆ PositionCurve

TObjectPtr<UCurveFloat> UProjectileMovementParabolicInterp::PositionCurve

◆ StartLocation

FVector UProjectileMovementParabolicInterp::StartLocation = FVector::ZeroVector
private

◆ TotalTime

float UProjectileMovementParabolicInterp::TotalTime = 1.f
private

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