Navigation
API > API/Plugins > API/Plugins/WaterAdvanced
| Name | UShallowWaterSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Experimental/WaterAdvanced/Source/WaterAdvanced/Public/ShallowWaterSubsystem.h |
| Include Path | #include "ShallowWaterSubsystem.h" |
Syntax
UCLASS (MinimalAPI, Abstract)
class UShallowWaterSubsystem : public UTickableWorldSubsystem
Inheritance Hierarchy
- FTickableObjectBase → FTickableGameObject → UTickableWorldSubsystem → UShallowWaterSubsystem
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UTickableWorldSubsystem → UShallowWaterSubsystem
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UShallowWaterSubsystem() |
ShallowWaterSubsystem.h |
Structs
| Name | Remarks |
|---|---|
| PendingImpact |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ColliderComponentTag | FName | Collision | ShallowWaterSubsystem.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bFlushPendingImpactsNextTick | bool | ShallowWaterSubsystem.h | ||
| bInitializationAsyncLoadsAttempted | bool | ShallowWaterSubsystem.h | ||
| bIsShallowWaterInitialized | bool | ShallowWaterSubsystem.h | ||
| LastOverlappingWaterBodies_Internal | TArray< TWeakObjectPtr< AWaterBody > > | Should only be managed by UpdateOverlappingWaterBodiesHistory() | ShallowWaterSubsystem.h | |
| LastTimeOverlappingAnyWaterBody | float | ShallowWaterSubsystem.h | ||
| PendingContexts | TArray< FShallowWaterCollisionContext > | 'Pending' also includes contexts already with collision enabled that will be skipped | ShallowWaterSubsystem.h | |
| PendingImpacts | TArray< PendingImpact > | ShallowWaterSubsystem.h | ||
| PendingWaterBodiesToSetMIDOnInitialize | TArray< TWeakObjectPtr< AWaterBody > > | ShallowWaterSubsystem.h | ||
| PreviousContexts | TArray< FShallowWaterCollisionContext > | Collision Context | ShallowWaterSubsystem.h | |
| RegisteredPhysicsAssetProxies | TMap< FGameplayTag, FShallowWaterPhysicsAssetOverride > | Overrides collected from RegisterPhysicsAssetOverridesDataAsset. | ShallowWaterSubsystem.h | |
| Tracker_Actors | TArray< FShallowWaterCollisionTracker_Actor > | ShallowWaterSubsystem.h | ||
| Tracker_Directs | TArray< FShallowWaterCollisionTracker_Direct > | ShallowWaterSubsystem.h | ||
| VehicleCollisionProxies | TMap< FShallowWaterCollisionContext, TObjectPtr< USkeletalMeshComponent > > | ShallowWaterSubsystem.h | ||
| WaitForPlayerControllerHandle | FTimerHandle | ShallowWaterSubsystem.h | ||
| WaterBodyComponentsWithProperMIDParameters | TSet< TWeakObjectPtr< UWaterBodyComponent > > | ShallowWaterSubsystem.h | ||
| WaterZonesWithMaterialsInitialized | TSet< TWeakObjectPtr< AWaterZone > > | ShallowWaterSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CreateRTs() |
ShallowWaterSubsystem.h | ||
void FlushPendingImpacts() |
ShallowWaterSubsystem.h | ||
TOptional< FVector > GetCameraLocationFromWeakController() |
ShallowWaterSubsystem.h | ||
int32 GetGridResolution() |
ShallowWaterSubsystem.h | ||
float GetGridSize() |
ShallowWaterSubsystem.h | ||
virtual ECollisionChannel GetImpactCollisionChannel() |
Override to return the ECC channel of bullets. | ShallowWaterSubsystem.h | |
APawn * GetNonSpectatorPawnFromWeakController() |
ShallowWaterSubsystem.h | ||
virtual TStatId GetStatId() |
ShallowWaterSubsystem.h | ||
APawn * GetTheMostRelevantPlayerPawn() |
Think of this as a cursor that in most time locks on the current player pawn If the player doesn't have a physical pawn (e.g. spectating), the cursor jump around and lock on the nearest pawn to the camera If there is no relevant pawn (all eliminate), returns nullptr | ShallowWaterSubsystem.h | |
virtual FGameplayTagContainer GetVehicleTags
(
FShallowWaterCollisionContext Context |
ShallowWaterSubsystem.h | ||
void InitializeParameters() |
ShallowWaterSubsystem.h | ||
virtual void InitializeShallowWater() |
ShallowWaterSubsystem.h | ||
virtual bool IsShallowWaterAllowedToInitialize () |
Note: A world subsystem is always created and activated even when the plugin (GFP or not) it resides in is completely disabled When the subclass of this class is a Game Feature Plugin. | ShallowWaterSubsystem.h | |
bool IsShallowWaterInitialized() |
ShallowWaterSubsystem.h | ||
virtual void OnWorldBeginPlay
(
UWorld& InWorld |
ShallowWaterSubsystem.h | ||
virtual void PostInitialize() |
ShallowWaterSubsystem.h | ||
void RegisterImpact
(
FVector ImpactPosition, |
ShallowWaterSubsystem.h |
|
|
void RegisterPhysicsAssetProxiesDataAsset
(
const UShallowWaterPhysicsAssetOverridesDataAsset* Proxies |
Add PA overrides. Designed to be called by Game Feature Plugins. | ShallowWaterSubsystem.h | |
void SetWaterBodyMIDParameters
(
AWaterBody* WaterBody |
Manually set MID parameters for water bodies before they collide with any pawns or CollisionTrackers. | ShallowWaterSubsystem.h |
|
virtual bool ShouldCreateSubsystem
(
UObject* Outer |
ShallowWaterSubsystem.h | ||
virtual void Tick
(
float DeltaTime |
ShallowWaterSubsystem.h | ||
void TryUpdateWaterBodyMIDParameters
(
UWaterBodyComponent* WaterBodyComponent |
ShallowWaterSubsystem.h | ||
void UpdateGridMovement() |
ShallowWaterSubsystem.h | ||
void WriteImpactToNDC
(
FVector ImpactPosition, |
ShallowWaterSubsystem.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddCollisionTrackerForActor
(
AActor* CollisionTrackerActor, |
ShallowWaterSubsystem.h |
|
|
void CleanUpVehicleCollisionProxies() |
Remove invalid references. The owning actor may get destroyed. | ShallowWaterSubsystem.h | |
void ClearTickCache() |
ShallowWaterSubsystem.h | ||
void DisableCollisionForContext
(
const FShallowWaterCollisionContext& Context |
ShallowWaterSubsystem.h | ||
void DisableCollisionForVehicle
(
const FShallowWaterCollisionContext& Context |
VehicleCollisionProxies is handled inside. | ShallowWaterSubsystem.h | |
void EnableCollisionForContext
(
const FShallowWaterCollisionContext& Context |
ShallowWaterSubsystem.h | ||
virtual TSet< AWaterBody * > GetAllOverlappingWaterBodiesAndUpdateCollisionTrackers() |
WaterBody is used for: Get water data texture Get water zone Get character location projected onto water surface Check if character or vehicle is 'in water' | ShallowWaterSubsystem.h |
|
virtual float GetColliderMaxRange() |
ShallowWaterSubsystem.h | ||
virtual TOptional< FShallowWaterCollisionContext > GetCollisionContextFromPawn
(
APawn* InPawn |
By default getting the first SKM, if is ACharacter, get 'Mesh' component Override if e.g. The pawn is driving a boat, return SKM of boat instead | ShallowWaterSubsystem.h | |
void GetOverlappingWaterBodiesFromActorTrackersAndUpdate
(
TSet< AWaterBody* >& WaterBodies |
ShallowWaterSubsystem.h | ||
void GetOverlappingWaterBodiesFromDirectTrackersAndUpdate
(
TSet< AWaterBody* >& WaterBodies |
ShallowWaterSubsystem.h | ||
virtual TSet< AWaterBody * > GetOverlappingWaterBodiesFromPawns() |
ShallowWaterSubsystem.h | ||
virtual TArray< APawn * > GetPawnsInRange
(
const bool bShouldSortBySignificance |
For overriden functions: Do not use GetTheMostRelevantPlayerPawn() inside to avoid loop. Use local controlled pawn location or camera location instead. | ShallowWaterSubsystem.h | |
virtual TArray< APawn * > GetPawnsInRange
(
const FVector ObservingLocation, |
ShallowWaterSubsystem.h | ||
void OnWaterInfoTextureArrayCreated
(
const UTextureRenderTarget2DArray* WaterInfoTexture |
ShallowWaterSubsystem.h | ||
void RemoveCollisionTrackerForActor
(
AActor* CollisionTrackerActor |
ShallowWaterSubsystem.h |
|
|
void SetSimParametersForWaterZone
(
AWaterZone* WaterZone |
WaterBody | ShallowWaterSubsystem.h | |
bool ShouldSimulateThisFrame() |
ShallowWaterSubsystem.h | ||
void TryGetOrWaitForWaterInfoTextureFromWaterBodies
(
TSet< AWaterBody* > CurrentWaterBodies |
ShallowWaterSubsystem.h | ||
bool TryGetOrWaitForWaterInfoTextureFromWaterBody
(
AWaterBody* CurrentWaterBody |
ShallowWaterSubsystem.h | ||
virtual int32 UpdateActivePawns() |
Override to get most relevant pawns every frame, this also sets up the per-tick cache that is reset with ClearTickCache. | ShallowWaterSubsystem.h | |
void UpdateCollisionForPendingContexts() |
ShallowWaterSubsystem.h | ||
void UpdateOverlappingWaterBodiesHistory
(
TArray< AWaterBody* > OverlappingWaterBodies |
ShallowWaterSubsystem.h |