| UObjectBase
|
Module |
|
Header |
/Engine/Plugins/Runtime/NetworkPrediction/Source/NetworkPrediction/Public/NetworkPredictionPhysicsComponent.h |
Include |
#include "NetworkPredictionPhysicsComponent.h" |
[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(BlueprintType, Meta=(BlueprintSpawnableComponent))
class UNetworkPredictionPhysicsComponent : public UActorComponent
UNetworkPredictionPhysicsComponent
This is a component that will register a FGenericPhysicsModelDef and bind to the first UPrimitiveComponent found in the parent actor. That is - there is NO backing NetworkPrediction simulation/gameplay code. This will always be SimulatedProxy and does not support any of the AP<>Server communication that UNetworkPredictionComponent.
To fully emphasize: this is for STAND ALONE physics objects that want to use NP's fixed tick services. It is NOT for "any NP object that uses physics". A vehicle that can be controlled by a client needs to use (or model after) UNetworkPredictionComponent.
Even then, it is just sort of an example. An extra component may not be the best way to use this. It may make more sense to just put the important bits on your actor class and set the exact UpdatedPrimitive you want (really PhysicsActorHandle is all that matters!)
Name | Description | ||
---|---|---|---|
|
NetworkPredictionProxy |
Proxy to interface with the NetworkPrediction system. |
|
|
ReplicationProxy |
||
|
UpdatedPrimitive |
Name | Description | |
---|---|---|
|
UNetworkPredictionPhysicsComponent() |
Name | Description | ||
---|---|---|---|
|
CheckOwnerRoleChange() |
Helper: Checks if the owner's role has changed and calls InitializeForNetworkRole if necessary. |
|
|
FReplication... |
GetReplicationProxies() |
|
|
InitializeForNetworkRole |
Finalizes initialization when NetworkRole changes. Does not need to be overridden. |
|
|
InitializeNetworkPredictionProxy() |
Classes must initialize the NetworkPredictionProxy (register with the NetworkPredictionSystem) here. EndPlay will unregister. |
|
|
SetPrimitiveComponent ( |
Name | Description | ||
---|---|---|---|
|
EndPlay ( |
Ends gameplay for this component. |
|
|
InitializeComponent() |
Initializes the component. |
|
|
PreReplication ( |
Called on the component right before replication occurs |
Name | Description | ||
---|---|---|---|
|
PreNetReceive() |
Called right before receiving a bunch |