Navigation
API > API/Plugins > API/Plugins/WaterAdvanced
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- USubsystem
- UWorldSubsystem
- UTickableWorldSubsystem
- UShallowWaterSubsystem
- UBasicShallowWaterSubsystem
References
| Module | WaterAdvanced |
| Header | /Engine/Plugins/Experimental/WaterAdvanced/Source/WaterAdvanced/Public/ShallowWaterSubsystem.h |
| Include | #include "ShallowWaterSubsystem.h" |
Syntax
UCLASS (Abstract)
class UShallowWaterSubsystem : public UTickableWorldSubsystem
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< TWeakObjectPtr< APawn > > | ActivePawns | Consistent record through multiple frames since we want active pawns that affects the fluidsim to remain active Even when it's less significant than newly available pawns. | |
| TObjectPtr< UMaterialParameterCollection > | MPC | ||
| TObjectPtr< UTextureRenderTarget2D > | NormalRT | ||
| FVector | PreviousProjectedLocation | ||
| TObjectPtr< UShallowWaterSettings > | Settings | ||
| TObjectPtr< UNiagaraComponent > | ShallowWaterNiagaraSimulation | Asset can be set in Project Settings - Plugins - Water ShallowWaterSimulation. | |
| TObjectPtr< const UTextureRenderTarget2DArray > | WaterInfoTexture | ||
| TWeakObjectPtr< APlayerController > | WeakPlayerController |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddCollisionTrackerForActor
(
AActor* CollisionTrackerActor, |
||
| void | Remove invalid references. The owning actor may get destroyed. | ||
| void | CreateRTs () |
||
| void | DisableCollisionForContext
(
const FShallowWaterCollisionContext& Context |
||
| void | DisableCollisionForVehicle
(
const FShallowWaterCollisionContext& Context |
VehicleCollisionProxies is handled inside. | |
| void | EnableCollisionForContext
(
const FShallowWaterCollisionContext& Context |
||
| void | |||
| void | GatherContextsFromPawns
(
TArray< TWeakObjectPtr< APawn > > ActivePawns |
||
| TSet< AWaterBody * > | 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' | ||
| TOptional< FVector > | |||
| float | |||
| 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 | |
| int32 | |||
| float | GetGridSize () |
||
| ECollisionChannel | Override to return the ECC channel of bullets. | ||
| APawn * | |||
| TSet< AWaterBody * > | |||
| TSet< AWaterBody * > | |||
| TSet< AWaterBody * > | |||
| 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. | |
| TArray< APawn * > | GetPawnsInRange
(
const FVector ObservingLocation, |
||
| APawn * | 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 | ||
| FGameplayTagContainer | GetVehicleTags
(
FShallowWaterCollisionContext Context |
||
| void | |||
| void | |||
| bool | 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. | ||
| bool | |||
| void | OnWaterInfoTextureArrayCreated
(
const UTextureRenderTarget2DArray* WaterInfoTexture |
||
| void | RegisterImpact
(
FVector ImpactPosition, |
||
| void | RegisterPhysicsAssetProxiesDataAsset
(
const UShallowWaterPhysicsAssetOverridesDataAsset* Proxies |
Add PA overrides. Designed to be called by Game Feature Plugins. | |
| void | RemoveCollisionTrackerForActor
(
AActor* CollisionTrackerActor |
||
| void | SetWaterBodyMIDParameters
(
AWaterBody* WaterBody |
Manually set MID parameters for water bodies before they collide with any pawns or CollisionTrackers. | |
| bool | |||
| void | TryGetOrWaitForWaterInfoTextureFromWaterBodies
(
TSet< AWaterBody* > CurrentWaterBodies |
WaterBody | |
| void | TryUpdateWaterBodyMIDParameters
(
UWaterBodyComponent* WaterBodyComponent |
||
| int32 | Override to get most relevant pawns every frame. | ||
| void | |||
| void | |||
| void | UpdateOverlappingWaterBodiesHistory
(
TArray< AWaterBody* > OverlappingWaterBodies |
||
| void | WriteImpactToNDC
(
FVector ImpactPosition, |
Overridden from UWorldSubsystem
| Type | Name | Description | |
|---|---|---|---|
| void | OnWorldBeginPlay
(
UWorld& InWorld |
Called when world is ready to start gameplay before the game mode transitions to the correct state and call BeginPlay on all actors | |
| void | Called once all UWorldSubsystems have been initialized |
Overridden from USubsystem
| Type | Name | Description | |
|---|---|---|---|
| bool | ShouldCreateSubsystem
(
UObject* Outer |
Override to control if the Subsystem should be created at all. |
Overridden from FTickableObjectBase
| Type | Name | Description | |
|---|---|---|---|
| TStatId | GetStatId () |
Return the stat id used to track the performance of this object | |
| void | Tick
(
float DeltaTime |
Pure virtual that must be overloaded by the inheriting class. |
Constants
| Name | Description |
|---|---|
| ColliderComponentTag | Collision |