Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
CharacterMovementComponentBase.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/CharacterMovementComponent.h"
7#include "CharacterMovementComponentBase.generated.h"
8
9class AActor;
10
11UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
12class CK_UE_API UCharacterMovementComponentBase : public UCharacterMovementComponent
13{
14 GENERATED_BODY()
15
16public:
17 // Sets default values for this component's properties
18 UCharacterMovementComponentBase();
19
20protected:
21 // Called when the game starts
22 virtual void BeginPlay() override;
23 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
24
25public:
26
27 //~ 타겟 회전
28 bool RotateToActor(AActor* TargetActor, float DeltaTime, float TurnSpeed, float Tolerance, bool bIsSmoothTurn = true);
29 bool RotateToLocation(const FVector& TargetLocation, float DeltaTime, float TurnSpeed, float Tolerance, bool bIsSmoothTurn = true);
30
31 void BeginManualRotation();
32 void EndManualRotation();
33
34private:
35 bool IsFacingLocation(const FVector& TargetLocation, float Tolerance) const;
36 void RestoreManualRotationSettings();
37
38private:
39 int32 ManualRotationLockCount = 0;
40
41 // 기존 회전 설정 캐싱 변수
42 bool bHasCachedManualRotationSettings = false;
43 bool bCachedUseControllerRotationYaw = false;
44 bool bCachedOrientRotationToMovement = false;
45 bool bCachedUseControllerDesiredRotation = false;
46};