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
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. | |
| TArray< uint8 > | LocalInputs | List of inputs that are processed locally. | |
| TArray< uint8 > | LocalStates | List of states that are processed locally. | |
| TArray< uint8 > | ReplicatedInputs | Replicated physics inputs | |
| TArray< uint8 > | ReplicatedStates | Replicated physics states |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNetworkPhysicsComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Add states/inputs history to rewind datas. | ||
| void | CorrectServerToLocalOffset
(
const int32 LocalToServerOffset |
Correct the player controller Server to local offset based on the received replicated states. | |
| void | CreateDatasHistory
(
UActorComponent* HistoryComponent |
Register and create the states/inputs history. | |
| TSharedPtr< Chaos::FBaseRewindHistory > & | Get the datas factory that will be used for net serialization. | ||
| APlayerController * | Get the player controller on which the component is attached. | ||
| TSharedPtr< Chaos::FBaseRewindHistory > & | Get the datas factory that will be used for net serialization. | ||
| 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. | |
| 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 states/inputs history from rewind datas. | ||
| void | Send the inputs replicated datas. | ||
| void | Send the states replicated datas. | ||
| void | ServerReceiveInputsDatas
(
const TArray< uint8 >& ClientInputs |
Server RPC to receive inputs from client. | |
| void | Update the histories packagemap for serialization. |
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. |