UGKFogOfWarLibrary#

Inheritance Relationships#

Base Type#

  • public UBlueprintFunctionLibrary

Class Documentation#

class UGKFogOfWarLibrary : public UBlueprintFunctionLibrary#

Helper functions

Public Static Functions

static void ConvertToObjectType(ECollisionChannel CollisionChannel, TArray<TEnumAsByte<EObjectTypeQuery>> &ObjectTypes)#
static bool IsVisible(UObject *WorldCtx, AActor const *Target)#

return true if the actor is visible by current client This is based off the clients own drawing of the fog so in case of cheating this method would be incorrect but that would only mean that the client is seeing the latest known position of the enemies since the enemies replicate only if visible (according to the server)

static class AGKFogOfWarVolume *GetFogOfWarVolume(UObject *WorldCtx)#

Retrieve the fog of war volume in the current level.

static FLinearColor SampleRenderTarget(class UTextureRenderTarget2D *InRenderTarget, FVector2D UV)#

Try to fetch the closest pixel by rounding the final coordinate UV is [0, 1]

static FLinearColor SamplePixelRenderTarget(class UTextureRenderTarget2D *InRenderTarget, FVector2D Pixel)#

The pixel is not even the closest in term of distance as the pixel coord gets truncated Pixel is [0, TextureSize] interpolation is not done, only one pixel is fetched

static inline FVector2D ToTextureCoordinate(FVector WorldLocation, FVector2D MapSize)#

Coordinate system change.

static inline FVector2D ToTextureCoordinate2D(FVector2D WorldLocation, FVector2D MapSize)#

Coordinate system change.

static inline float GetYaw(FVector Origin, FVector Target)#

Normalized Look At Rotation.

static void GetVisibleBounds(FVector Location, AActor *Actor, FVector &OutMin, FVector &OutMax)#

Returns the two points of an actor that are visible from Location This uses a lookup table to know which points are visible

static inline FIntVector WorldToGrid(FVector GridSize, FVector World)#

Coordinate system change.

static inline FVector SnapToGrid(FVector GridSize, FVector World)#

Snap coordinate to a grid.

static inline FVector GridToWorld(FVector GridSize, FIntVector Grid)#

Coordinate system change.

static class APlayerController *GetLocalController(UObject *WorldCtx)#

Retrieve local controller.

static struct FGenericTeamId GetLocalTeam(UObject *WorldCtx)#

Retrieve the team of the local controller.

static TArray<FGKFogTeamInfo> const &GetTeamInfo(UObject *WorldCtx)#

Retrieve the team infos from the Game state.

static int GetTeamCount(UObject *WorldCtx)#

Retrieve the number of teams from the Game state.

static struct FGKFogOfWarTeamsInfoHandle MakeFogOfWarTeamsHandle (UPARAM(ref) TArray< FGKFogTeamInfo > &Teams)

Build a new handle to an array of TeamInfo.

static struct FGKFogOfWarTeamInfoHandle MakeFogOfWarTeamHandle (UPARAM(ref) TArray< FGKFogTeamInfo > &Teams, FGenericTeamId TeamId)
static TArray<FGKFogTeamInfo> GetFogOfWarTeamFromHandle(FGKFogOfWarTeamsInfoHandle Handle)#

Retrieve the team infos from an Handle.

static TArray<FGKFogTeamInfo> &GetMutableTeamInfo(UObject *WorldCtx, bool &bSuccess)#
static void GetFogOfWarTeamInfo(TScriptInterface<IGKFogOfWarGameStateInterface> GameState, FGenericTeamId TeamId, struct FGKFogTeamInfo &TeamInfo)#
static FGKFogOfWarVersionInfo GetGKFogOfWarVersionInfo()#
static inline FName GetFogOfWarTeamName(FGKFogOfWarTeamInfoHandle Handle)#
static inline FText GetFogOfWarTeamDescription(FGKFogOfWarTeamInfoHandle Handle)#
static inline FText GetFogOfWarTeamLocalName(FGKFogOfWarTeamInfoHandle Handle)#
static inline FLinearColor GetFogOfWarTeamColor(FGKFogOfWarTeamInfoHandle Handle)#
static FGKFogTeamInfo GetFogOfWarTeamInfoFromName(UObject *WorldCtx, FName TeamName)#