42{
43 Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference);
44
45 if (MeshComp == nullptr)
46 {
47 return;
48 }
49
50 UWorld* World = MeshComp->GetWorld();
51
52 if (World == nullptr || World->IsGameWorld() == false)
53 {
54 return;
55 }
56
57 AActor* OwnerActor = MeshComp->GetOwner();
58
59 if (IsValid(OwnerActor) == false)
60 {
61 return;
62 }
63
64 UCharacterMovementComponentBase* RotationComponent = OwnerActor->FindComponentByClass<UCharacterMovementComponentBase>();
65
66 if (IsValid(RotationComponent) == false)
67 {
68 return;
69 }
70
72
73 if (IsValid(TargetActor) == false)
74 {
75 return;
76 }
77
78 RotationComponent->RotateToActor(TargetActor, FrameDeltaTime,
TurnSpeed,
Tolerance,
true);
79}
float Tolerance
Definition AnimNotifyState_RotateToTarget.h:32
float TurnSpeed
Definition AnimNotifyState_RotateToTarget.h:29
AActor * ResolveRotationTarget(AActor *OwnerActor, UWorld *World) const
Definition AnimNotifyState_RotateToTarget.cpp:113