You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "Templates/SubclassOf.h"
|
|
#include "NavAreas/NavArea.h"
|
|
#include "NavRelevantComponent.h"
|
|
#include "NavModifierComponent.generated.h"
|
|
|
|
struct FNavigationRelevantData;
|
|
|
|
UCLASS(ClassGroup = (Navigation), meta = (BlueprintSpawnableComponent), hidecategories = (Activation), config = Engine, defaultconfig)
|
|
class NAVIGATIONSYSTEM_API UNavModifierComponent : public UNavRelevantComponent
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Navigation)
|
|
TSubclassOf<UNavArea> AreaClass;
|
|
|
|
/** box extent used ONLY when owning actor doesn't have collision component */
|
|
UPROPERTY(EditAnywhere, Category = Navigation)
|
|
FVector FailsafeExtent;
|
|
|
|
/** Setting to 'true' will result in expanding lower bounding box of the nav
|
|
* modifier by agent's height, before applying to navmesh */
|
|
UPROPERTY(config, EditAnywhere, Category = Navigation)
|
|
uint8 bIncludeAgentHeight : 1;
|
|
|
|
virtual void CalcAndCacheBounds() const override;
|
|
virtual void GetNavigationData(FNavigationRelevantData& Data) const override;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "AI|Navigation")
|
|
void SetAreaClass(TSubclassOf<UNavArea> NewAreaClass);
|
|
|
|
protected:
|
|
struct FRotatedBox
|
|
{
|
|
FBox Box;
|
|
FQuat Quat;
|
|
|
|
FRotatedBox() {}
|
|
FRotatedBox(const FBox& InBox, const FQuat& InQuat) : Box(InBox), Quat(InQuat) {}
|
|
};
|
|
|
|
mutable TArray<FRotatedBox> ComponentBounds;
|
|
};
|