A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
VRPathFollowingComponent.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4#include "CoreMinimal.h"
5#include "VRBPDatatypes.h"
6#include "VRRootComponent.h"
8#include "Navigation/PathFollowingComponent.h"
9#include "AbstractNavData.h"
10#include "Runtime/Launch/Resources/Version.h"
11#include "VRPathFollowingComponent.generated.h"
12
14
15UCLASS()
16class VREXPANSIONPLUGIN_API UVRPathFollowingComponent : public UPathFollowingComponent
17{
18 GENERATED_BODY()
19
20public:
21 UPROPERTY(transient)
23
24 // Add link to VRMovementComp
25 void SetMovementComponent(UNavMovementComponent* MoveComp) override;
26
28 // Have to override this to call the correct HasReachCurrentTarget
29 void UpdatePathSegment() override;
30 bool HasReachedCurrentTarget(const FVector& CurrentLocation) const;
31
32 // Had to override this to get the correct DebugReachTest
33 virtual void GetDebugStringTokens(TArray<FString>& Tokens, TArray<EPathFollowingDebugTokens::Type>& Flags) const override;
34 void DebugReachTest(float& CurrentDot, float& CurrentDistance, float& CurrentHeight, uint8& bDotFailed, uint8& bDistanceFailed, uint8& bHeightFailed) const;
35
36 void FollowPathSegment(float DeltaTime) override;
37 int32 DetermineStartingPathPoint(const FNavigationPath* ConsideredPath) const override;
38
39
40 // This has a foot location when using meta paths, i'm not overriding it yet but this means that meta paths might have slightly bugged implementation.
42 //virtual void OnPathFinished(const FPathFollowingResult& Result) override;
43
46 void PauseMove(FAIRequestID RequestID = FAIRequestID::CurrentRequest, EPathFollowingVelocityMode VelocityMode = EPathFollowingVelocityMode::Reset) override;
47 // Now has an actor feet call .......Just a debug reference
48 //virtual FAIRequestID RequestMove(FNavPathSharedPtr Path, FRequestCompletedSignature OnComplete, const AActor* DestinationActor = NULL, float AcceptanceRadius = UPathFollowingComponent::DefaultAcceptanceRadius, bool bStopOnOverlap = true, FCustomMoveSharedPtr GameData = NULL) override;
49
50
51 // Fine in 4.13
52 bool ShouldCheckPathOnResume() const override;
53
54 // Fine in 4.13, had to change feet based for both
55 bool UpdateBlockDetection() override;
56
57
63 bool HasReached(const FVector& TestPoint, EPathFollowingReachMode ReachMode, float AcceptanceRadius = UPathFollowingComponent::DefaultAcceptanceRadius) const;
64
71 bool HasReached(const AActor& TestGoal, EPathFollowingReachMode ReachMode, float AcceptanceRadius = UPathFollowingComponent::DefaultAcceptanceRadius, bool bUseNavAgentGoalLocation = true) const;
72};
DECLARE_LOG_CATEGORY_EXTERN(LogPathFollowingVR, Warning, All)
UVRBaseCharacterMovementComponent * VRMovementComp
UPROPERTY(transient)