Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Physics
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UNetworkPhysicsComponent
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/Physics/NetworkPhysicsComponent.h |
| Include | #include "Physics/NetworkPhysicsComponent.h" |
Syntax
UCLASS (BlueprintType, MinimalAPI)
class UNetworkPhysicsComponent : public UActorComponent
Remarks
Network physics component that will be attached to any player controller
Variables
| Type | Name | Description | |
|---|---|---|---|
| int32 | FrameCounter | Frame counter to compute the local to server offset. | |
| FNetworkPhysicsRewindDataInputProxy | ReplicatedInputs | Replicated physics inputs | |
| FNetworkPhysicsRewindDataStateProxy | ReplicatedStates | Replicated physics states |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNetworkPhysicsComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Add state/input history to rewind data. | ||
| void | |||
| void | CorrectServerToLocalOffset
(
const int32 LocalToServerOffset |
Correct the player controller Server to local offset based on the received replicated states | |
| void | CreateDataHistory
(
UActorComponent* HistoryComponent |
Register and create the states/inputs history. | |
| void | CreateDatasHistory
(
UActorComponent* HistoryComponent |
DEPRECATED UE 5.4 | |
| const float | GetCurrentInputDecay
(
FNetworkPhysicsData* PhysicsData |
Returns the current amount of input decay during resimulation as a magnitude from 0.0 to 1.0. | |
| TSharedPtr< Chaos::FBaseRewindHistory > & | Get the data factory that will be used for net serialization. | ||
| TSharedPtr< Chaos::FBaseRewindHistory > & | |||
| const bool | Check if this is controlled locally through relayed inputs from autonomous proxy. | ||
| APlayerController * | Get the player controller on which the component is attached. | ||
| TSharedPtr< Chaos::FBaseRewindHistory > & | Get the data factory that will be used for net serialization. | ||
| TSharedPtr< Chaos::FBaseRewindHistory > & | |||
| bool | Check if the player controller exists and is local | ||
| bool | Check if the world is on server. | ||
| void | InitPhysics () |
Init the network physics component. | |
| bool | Check if this is controlled locally through relayed inputs or an existing local player controller. | ||
| void | OnPostProcessInputsInternal
(
const int32 PhysicsStep |
Delegate linked to the physics rewind callback to send record local inputs/states. | |
| void | OnPreProcessInputsInternal
(
const int32 PhysicsStep |
Delegate linked to the physics rewind callback to send record local inputs/states. | |
| void | Repnotify for the inputs on the client | ||
| void | Repnotify for the states on the client | ||
| void | Remove state/input history from rewind data. | ||
| void | |||
| void | Replicate input data. | ||
| void | |||
| void | |||
| void | Replicate state data. | ||
| void | ServerReceiveInputData
(
const FNetworkPhysicsRewindDataInputProxy& ClientInputs |
Server RPC to receive inputs from client. | |
| void | ServerReceiveInputsDatas
(
const FNetworkPhysicsRewindDataInputProxy& ClientInputs |
||
| void | SetIsRelayingLocalInputs
(
bool bInRelayingLocalInputs |
Mark this as controlled through locally relayed inputs rather than controlled as a pawn through a player controller. | |
| int32 | Enable RewindData history caching and return the history size. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | AsyncPhysicsTickComponent
(
float DeltaTime, |
Async physics tick component function per frame from the solver. | |
| void | BeginPlay () |
Used to create any physics engine information for this component. | |
| void | Register the component into the network manager. | ||
| void | Unregister the component from the network manager. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | GetLifetimeReplicatedProps
(
TArray< FLifetimeProperty >& OutLifeTimeProps |
Function to init the replicated properties. |