ENetworkPredictionExtrasFlyingInputPreset

[ANetworkPredictionExtrasFlyingPawn](API\Plugins\NetworkPredictionExtras\ANetworkPredictionExtrasFlyingPa-)

Choose your operating system:

Windows

macOS

Linux

References

Module

NetworkPredictionExtras

Header

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

Include

#include "NetworkPredictionExtrasFlyingPawn.h"

Syntax

enum ENetworkPredictionExtrasFlyingInputPreset
{
    None,
    Forward,
}

Values

Name

Description

None

No input

Forward

Just moves forward

Remarks

ANetworkPredictionExtrasFlyingPawn

This provides a minimal pawn class that uses UFlyingMovementCompnent. 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 flying movement simulation. This includes some basic camera/aiming code.

Highlights: FlyingMovement::FMovementSystem::SimulationTick The "core update" function of the flying movement simulation. ANetworkPredictionExtrasFlyingPawn::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.FlyingPawn.CameraSyle [0-3] Changes camera mode style. nms.Debug.LocallyControlledPawn 1 Enables debug hud. binds to '9' by default, see ANetworkPredictionExtrasFlyingPawn() nms.Debug.ToggleContinous 1 Toggles continuous updates of the debug hud. binds to '0' by default, see ANetworkPredictionExtrasFlyingPawn()