Navigation
API > API/Plugins > API/Plugins/NetworkPredictionExtras
ActorComponent for running Mock Ability Simulation for CharacterMotion example
| Name | UMockCharacterAbilityComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/NetworkPredictionExtras/Source/NetworkPredictionExtras/Public/MockCharacterAbilitySimulation.h |
| Include Path | #include "MockCharacterAbilitySimulation.h" |
Syntax
UCLASS (BlueprintType, Meta=(BlueprintSpawnableComponent))
class UMockCharacterAbilityComponent : public UCharacterMotionComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UNetworkPredictionComponent → UBaseMovementComponent → UCharacterMotionComponent → UMockCharacterAbilityComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMockCharacterAbilityComponent() |
MockCharacterAbilitySimulation.h |
Classes
| Name | Remarks |
|---|---|
| FMockCharacterAbilityBlinkCueEvent | Blueprint assignable events for blinking. This allows the user/blueprint to implement rollback-able events. |
| FMockCharacterAbilityBlinkCueRollback | |
| FMockCharacterAbilityNotifyStateChange | / NetSimCues void HandleCue(const FMockCharacterAbilityBlinkActivateCue& BlinkCue, const FNetSimCueSystemParamemters& SystemParameters); void HandleCue(const FMockCharacterAbilityBlinkCue& BlinkCue, const FNetSimCueSystemParamemters& SystemParameters); void HandleCue(const FMockCharacterAbilityPhysicsGunFireCue& FireCue, const FNetSimCueSystemParamemters& SystemParameters); |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FProduceMockCharacterAbilityInput | TBaseDelegate_TwoParams< void, const int32, FMockCharacterAbilityInputCmd & > | MockCharacterAbilitySimulation.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnBlinkActivateEvent | FMockCharacterAbilityBlinkCueEvent | MockCharacterAbilitySimulation.h |
|
|
| OnBlinkActivateEventRollback | FMockCharacterAbilityBlinkCueRollback | MockCharacterAbilitySimulation.h |
|
|
| OnBlinkStateChange | FMockCharacterAbilityNotifyStateChange | Notifies when Blink Changes. | MockCharacterAbilitySimulation.h |
|
| OnDashStateChange | FMockCharacterAbilityNotifyStateChange | Notifies when Dash state changes. | MockCharacterAbilitySimulation.h |
|
| OnJumpStateChange | FMockCharacterAbilityNotifyStateChange | Notifies when Jump Changes. | MockCharacterAbilitySimulation.h |
|
| OnSprintStateChange | FMockCharacterAbilityNotifyStateChange | Notifies when Sprint state changes. | MockCharacterAbilitySimulation.h |
|
| ProduceInputDelegate | FProduceMockCharacterAbilityInput | MockCharacterAbilitySimulation.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsBlinking | bool | MockCharacterAbilitySimulation.h | ||
| bIsDashing | bool | MockCharacterAbilitySimulation.h | ||
| bIsJumping | bool | MockCharacterAbilitySimulation.h | ||
| bIsSprinting | bool | Local cached values for detecting state changes from the sim in FinalizeFrame Its tempting to think FinalizeFrame could pass in the previous frames values but this could not be reliable if buffer sizes are small and network conditions etc - you may not always know what was the "last finalized frame" or even have it in the buffers anymore. | MockCharacterAbilitySimulation.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void FinalizeFrame
(
const FMockCharacterAbilitySyncState* SyncState, |
MockCharacterAbilitySimulation.h | ||
float GetBlinkWarmupTimeSeconds() |
MockCharacterAbilitySimulation.h |
|
|
float GetMaxStamina() |
MockCharacterAbilitySimulation.h |
|
|
float GetStamina() |
MockCharacterAbilitySimulation.h |
|
|
virtual void InitializeSimulationState
(
FMockCharacterAbilitySyncState* SyncState, |
MockCharacterAbilitySimulation.h | ||
bool IsBlinking() |
Are we currently in the blinking (startup) state. | MockCharacterAbilitySimulation.h |
|
bool IsDashing() |
Are we currently in the dashing state. | MockCharacterAbilitySimulation.h |
|
bool IsJumping() |
Are we currently in the jumping state. | MockCharacterAbilitySimulation.h |
|
bool IsSprinting() |
Are we currently in the sprinting state. | MockCharacterAbilitySimulation.h |
|
virtual void ProduceInput
(
const int32 SimTimeMS, |
MockCharacterAbilitySimulation.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void InitMockCharacterAbilitySimulation
(
FMockCharacterAbilitySimulation* Simulation |
MockCharacterAbilitySimulation.h |
Overridden from UNetworkPredictionComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InitializeNetworkPredictionProxy() |
Network Prediction. | MockCharacterAbilitySimulation.h |