Hi! I’m taking a look to UE’s source code and step into FAISystem namespace. Within this namespace there’re some member variables:
static const FRotator InvalidRotation = FRotator(FLT_MAX);
static const FQuat InvalidOrientation = FQuat(FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX);
static const FVector InvalidLocation = FVector(FLT_MAX);
static const FVector InvalidDirection = FVector::ZeroVector;
static const float InvalidRange = -1.f;
static const float InfiniteInterval = -FLT_MAX;
static const uint32 InvalidUnsignedID = uint32(INDEX_NONE);
I’m curious about this const variables, I don’t understand what they do; their purpouse. In my ignorance I’m suposing they are some kind of initialization which represent something equivalent to a nullptr (regarding to funcionality). I’m thinking this for the use given to this const in other parts of the engine, e.g.:
struct FFocusKnowledge
{
struct FFocusItem
{
TWeakObjectPtr<AActor> Actor;
FVector Position;
FFocusItem()
{
Actor = nullptr;
Position = FAISystem::InvalidLocation;
}
};
TArray<FFocusItem> Priorities;
};
As you can see, Position is set to FAISystem::InvalidLocation, why?. Could someone please elaborate further on this, I aprecciated in advanced!