#include <EnemyMotionWarpingComponent.h>
|
| | UCharacterMotionWarpingComponentBase (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get()) |
| |
| void | StopMotionWarp (FName WarpTargetName=NAME_None) |
| |
| void | UpdateMotionWarpTarget (FName WarpTargetName, const FVector &TargetLocation, const FRotator &TargetRotation, bool bRestart=false) |
| |
| void | UpdateMotionWarpToTarget (FName WarpTargetName, ITargetableInterface *Target, float CorrectionRange, float DesiredRange, float InnerOffset) |
| |
| void | RotateCharacterToNearestTarget (FName WarpTargetName=FName("Target"), float TargetRange=450.0f) |
| |
| bool | UpdateMotionWarpTargetToNearestTargetAtRange (FName WarpTargetName, float CorrectionRange, float DesiredRange, float InnerOffset) |
| |
| virtual void | ResetLockOnTarget () |
| |
| FORCEINLINE FVector | GetWarpSteeringDirection () const |
| |
| virtual bool | FindWarpTargetLocation (float MaxRange, FVector &OutTargetLocation) PURE_VIRTUAL(UCharacterMotionWarpingComponentBase |
| |
◆ FindWarpTargetLocation()
| bool UEnemyMotionWarpingComponent::FindWarpTargetLocation |
( |
float |
MaxRange, |
|
|
FVector & |
OutTargetLocation |
|
) |
| |
|
overrideprotectedvirtual |
11{
12 const AActor* OwnerActor = GetOwner();
13
14 if (OwnerActor == nullptr)
15 {
16 return false;
17 }
18
19 const ACharacter* PlayerCharacter = UGameplayStatics::GetPlayerCharacter(OwnerActor, 0);
20
21 if (PlayerCharacter == nullptr)
22 {
23 return false;
24 }
25
26 FVector ToPlayer = PlayerCharacter->GetActorLocation() - OwnerActor->GetActorLocation();
27 ToPlayer.Z = 0.0f;
28
29
30 if (MaxRange > 0.0f && ToPlayer.SizeSquared() > FMath::Square(MaxRange))
31 {
32 return false;
33 }
34
35 OutTargetLocation = PlayerCharacter->GetActorLocation();
36 return true;
37}
이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: