#include <GA_Base.h>
◆ UGA_Base()
12{
13 InstancingPolicy = EGameplayAbilityInstancingPolicy::InstancedPerActor;
14}
◆ GetCursorData()
| bool UGA_Base::GetCursorData |
( |
FVector & |
TargetPos, |
|
|
FRotator & |
TargetRot |
|
) |
| const |
|
protected |
17{
18 const FGameplayAbilityActorInfo* ActorInfo = GetCurrentActorInfo();
19 ensure(ActorInfo);
20
22 {
23 if (PC->GetMouseLocation(TargetPos))
24 {
25 if (AActor* AvatarActor = ActorInfo->AvatarActor.Get())
26 {
27 FVector LookVector = TargetPos - AvatarActor->GetActorLocation();
28 LookVector.Z = 0.0f;
29 TargetRot = LookVector.Rotation();
30
31 return true;
32 }
33 }
34 }
35
36 return false;
37}
Definition CK_PlayerController.h:16
◆ MotionWarpTargetToCursor()
| void UGA_Base::MotionWarpTargetToCursor |
( |
FName |
WarpTargetName = FName("Target") | ) |
|
|
protected |
40{
41 FVector TargetPos;
42 FRotator TargetRot;
43
45 {
46 return;
47 }
48
49 if (
ACK_CharacterPlayer* Character = Cast<ACK_CharacterPlayer>(GetAvatarActorFromActorInfo()))
50 {
51 if (UMotionWarpingComponent* MWComp = Character->GetMotionWarpingComponent())
52 {
53 MWComp->AddOrUpdateWarpTargetFromLocationAndRotation(WarpTargetName, TargetPos, TargetRot);
54 }
55 }
56}
Definition CK_CharacterPlayer.h:20
bool GetCursorData(FVector &TargetPos, FRotator &TargetRot) const
Definition GA_Base.cpp:16
◆ RotateCharacterToCursor()
| void UGA_Base::RotateCharacterToCursor |
( |
| ) |
|
|
protected |
59{
60 FVector TargetPos;
61 FRotator TargetRot;
62
64 {
65 return;
66 }
67
68 if (AActor* Avatar = GetAvatarActorFromActorInfo())
69 {
70 Avatar->SetActorRotation(TargetRot);
71 }
72}
이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: