Navigation
API > API/Plugins > API/Plugins/NetworkPredictionExtras
Mock Physics Simulation This is an example of NP Sim + Physics working together. The NP sim is super simple: it applies forces to the physics body based on InputCmd. In this example there is no Sync state, mainly to illustrate that it is actually optional. That is not a requirement of physics based NP sims.
| Name | FMockPhysicsInputCmd |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/NetworkPredictionExtras/Source/NetworkPredictionExtras/Public/MockPhysicsSimulation.h |
| Include Path | #include "MockPhysicsSimulation.h" |
Syntax
USTRUCT (BlueprintType )
struct FMockPhysicsInputCmd
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMockPhysicsInputCmd() |
MockPhysicsSimulation.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bChargePressed | bool | MockPhysicsSimulation.h |
|
|
| bJumpedPressed | bool | MockPhysicsSimulation.h |
|
|
| MovementInput | FVector | MockPhysicsSimulation.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void NetSerialize
(
const FNetSerializeParams& P |
MockPhysicsSimulation.h | ||
void ToString
(
FAnsiStringBuilderBase& Out |
MockPhysicsSimulation.h |