ENetworkPredictionExtrasCharacterInputPreset

[ANetworkPredictionExtrasCharacter](API\Plugins\NetworkPredictionExtras\ANetworkPredictionExtrasCharacte-)

Choose your operating system:

Windows

macOS

Linux

References

Module

NetworkPredictionExtras

Header

/Engine/Plugins/Runtime/NetworkPredictionExtras/Source/NetworkPredictionExtras/Public/NetworkPredictionExtrasCharacter.h

Include

#include "NetworkPredictionExtrasCharacter.h"

Syntax

enum ENetworkPredictionExtrasCharacterInputPreset
{
    None,
    Forward,
}

Values

Name

Description

None

No input

Forward

Just moves forward

Remarks

ANetworkPredictionExtrasCharacter

This provides a minimal pawn class that uses UCharacterMotionCompnent. This isn't really intended to be used in shipping games, rather just to serve as standalone example of using the system, contained completely in the NetworkPredictionExtras plugin. Apart from the most basic glue/setup, this class provides an example of turning UE4 input event callbacks into the input commands that are used by the Character movement simulation. This includes some basic camera/aiming code.

Highlights: CharacterMotion::FMovementSystem::SimulationTick The "core update" function of the Character movement simulation. ANetworkPredictionExtrasCharacter::GenerateLocalInput Function that generates local input commands that are fed into the movement system.

Usage: You should be able to just use this pawn like you would any other pawn. You can specify it as your pawn class in your game mode, or manually override in world settings, etc. Alternatively, you can just load the NetworkPredictionExtras/Content/TestMap.umap which will have everything setup.

Once spawned, there are some useful console commands: NetworkPredictionExtras.Character.CameraSyle [0-3] Changes camera mode style. nms.Debug.LocallyControlledPawn 1 Enables debug hud. binds to '9' by default, see ANetworkPredictionExtrasCharacter() nms.Debug.ToggleContinous 1 Toggles continuous updates of the debug hud. binds to '0' by default, see ANetworkPredictionExtrasCharacter()