ACharacter

Characters are Pawns that have a mesh, collision, and built-in movement logic.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/Character.h

Include

#include "GameFramework/Character.h"

Syntax

class ACharacter : public APawn

Remarks

Characters are Pawns that have a mesh, collision, and built-in movement logic. They are responsible for all physical interaction between the player or AI and the world, and also implement basic networking and input models. They are designed for a vertically-oriented player representation that can walk, jump, fly, and swim through the world using CharacterMovementComponent.

Variables

Name Description

Protected variable

float

 

AnimRootMotionTranslationScale

Scale to apply to root motion translation on this Character

Protected variable

FBasedMovementI...

 

BasedMovement

Info about our current movement base (object we are standing on).

Protected variable

FQuat

 

BaseRotationOffset

Saved rotation offset of mesh.

Protected variable

FVector

 

BaseTranslationOffset

Saved translation offset of mesh.

Public variable

uint32: 1

 

bClientCheckEncroachmentOnNetUpdate

Public variable

uint32: 1

 

bClientResimulateRootMotion

If server disagrees with root motion track position, client has to resimulate root motion from last AckedMove.

Public variable

uint32: 1

 

bClientResimulateRootMotionSources

If server disagrees with root motion state, client has to resimulate root motion from last AckedMove.

Public variable

uint32: 1

 

bClientUpdating

When true, applying updates to network client (replaying saved moves for a locally controlled character)

Public variable

uint32: 1

 

bClientWasFalling

True if Pawn was initially falling when started to replay network moves.

Protected variable

bool

 

bInBaseReplication

Flag that we are receiving replication of the based movement.

Public variable

uint32: 1

 

bIsCrouched

Set by character movement to specify that this Character is currently crouched.

Public variable

uint32: 1

 

bPressedJump

When true, player wants to jump

Public variable

uint32: 1

 

bProxyIsJumpForceApplied

Set to indicate that this Character is currently under the force of a jump (if JumpMaxHoldTime is non-zero).

Public variable

uint32: 1

 

bServerMoveIgnoreRootMotion

Disable root motion on the server.

Public variable

uint32: 1

 

bSimGravityDisabled

Disable simulated gravity (set when character encroaches geometry on client, to keep him from falling through floors)

Public variable

uint32: 1

 

bWasJumping

Tracks whether or not the character was already jumping last frame.

Public variable

FRootMotionMove...

 

ClientRootMotionParams

For LocallyControlled Autonomous clients. Saved root motion data to be used by SavedMoves.

Public variable

float

 

CrouchedEyeHeight

Default crouched eye height

Public variable

int32

 

JumpCurrentCount

Tracks the current number of jumps performed.

Public variable

int32

 

JumpCurrentCountPreJump

Represents the current number of jumps performed before CheckJumpInput modifies JumpCurrentCount.

Public variable

float

 

JumpForceTimeRemaining

Amount of jump force time remaining, if JumpMaxHoldTime > 0.

Public variable

float

 

JumpKeyHoldTime

Jump key Held Time. This is the time that the player has held the jump key, in seconds.

Public variable

int32

 

JumpMaxCount

The max number of jumps the character can perform.

Public variable

float

 

JumpMaxHoldTime

The max time the jump key can be held.

Public variable

FLandedSignatur...

 

LandedDelegate

Called upon landing when falling, to perform actions based on the Hit result.

Public variable

FMovementModeCh...

 

MovementModeChangedDelegate

Multicast delegate for MovementMode changing.

Public variable

uint32

 

NumActorOverlapEventsCounter

Incremented every time there is an Actor overlap event (start or stop) on this actor.

Public variable

FCharacterMovem...

 

OnCharacterMovementUpdated

Event triggered at the end of a CharacterMovementComponent movement update.

Public variable

FCharacterReach...

 

OnReachedJumpApex

Broadcast when Character's jump reaches its apex. Needs CharacterMovement->bNotifyApex = true

Public variable

float

 

ProxyJumpForceStartedTime

Track last time a jump force started for a proxy.

Protected variable

float

 

ReplayLastTransformUpdateTimeStamp

Protected variable

FBasedMovementI...

 

ReplicatedBasedMovement

Replicated version of relative movement. Read-only on simulated proxies!

Protected variable

uint8

 

ReplicatedMovementMode

CharacterMovement MovementMode (and custom mode) replicated for simulated proxies.

Protected variable

float

 

ReplicatedServerLastTransformUpdateTimeStamp

CharacterMovement ServerLastTransformUpdateTimeStamp value, replicated to simulated proxies.

Public variable

FRepRootMotionM...

 

RepRootMotion

Replicated Root Motion montage

Public variable

TArray< FSimula...

 

RootMotionRepMoves

Array of previously received root motion moves from the server.

Public variable

FRootMotionSour...

 

SavedRootMotion

For LocallyControlled Autonomous clients.

Constructors

Name Description

Public function

ACharacter

(
    const FObjectInitializer& ObjectIn...
)

Default UObject constructor.

Functions

Name Description

Public function Virtual

void

 

ApplyDamageMomentum

(
    float DamageTaken,
    FDamageEvent const& DamageEvent,
    APawn* PawnInstigator,
    AActor* DamageCauser
)

Apply momentum caused by damage.

Protected function Virtual

void

 

BaseChange()

Event called after actor's base changes (if SetBase was requested to notify us with bNotifyPawn).

Public function Virtual

void

 

CacheInitialMeshOffset

(
    FVector MeshRelativeLocation,
    FRotator MeshRelativeRotation
)

Cache mesh offset from capsule.

Public function Virtual Const

bool

 

CanCrouch()

Public function Const

bool

 

CanJump()

Check if the character can jump in the current state.

Protected function Const

bool

 

CanJumpInternal()

Customizable event to check if the character can jump in the current state.

Protected function Virtual Const

bool

 

CanJumpInternal_Implementation()

Customizable event to check if the character can jump in the current state.

Public function Const

bool

 

CanUseRootMotionRepMove

(
    const FSimulatedRootMotionReplicate...,
    const FAnimMontageInstance& Client...
)

True if buffered move is usable to teleport client back to.

Public function Virtual

void

 

CheckJumpInput

(
    float DeltaTime
)

Trigger jump if jump button has been pressed.

Public function Virtual

void

 

ClearJumpInput

(
    float DeltaTime
)

Update jump input state after having checked input.

Public function

void

 

ClientAckGoodMove

(
    float TimeStamp
)

If no client adjustment is needed after processing received ServerMove(), ack the good move so client can remove it from SavedMoves

Public function

void

 

ClientAckGoodMove_Implementation

(
    float TimeStamp
)

If no client adjustment is needed after processing received ServerMove(), ack the good move so client can remove it from SavedMoves

Public function

void

 

ClientAdjustPosition

(
    float TimeStamp,
    FVector NewLoc,
    FVector NewVel,
    UPrimitiveComponent* NewBase,
    FName NewBaseBoneName,
    bool bHasBase,
    bool bBaseRelativePosition,
    uint8 ServerMovementMode
)

Replicate position correction to client, associated with a timestamped servermove.

Public function

void

 

ClientAdjustPosition_Implementation

(
    float TimeStamp,
    FVector NewLoc,
    FVector NewVel,
    UPrimitiveComponent* NewBase,
    FName NewBaseBoneName,
    bool bHasBase,
    bool bBaseRelativePosition,
    uint8 ServerMovementMode
)

Replicate position correction to client, associated with a timestamped servermove.

Public function

void

 

ClientAdjustRootMotionPosition

(
    float TimeStamp,
    float ServerMontageTrackPosition,
    FVector ServerLoc,
    FVector_NetQuantizeNormal ServerRot...,
    float ServerVelZ,
    UPrimitiveComponent* ServerBas...,
    FName ServerBoneName,
    bool bHasBase,
    bool bBaseRelativePosition,
    uint8 ServerMovementMode
)

Replicate position correction to client when using root motion for movement.

Public function

void

 

ClientAdjustRootMotionPosition_Implementation

(
    float TimeStamp,
    float ServerMontageTrackPosition,
    FVector ServerLoc,
    FVector_NetQuantizeNormal ServerRot...,
    float ServerVelZ,
    UPrimitiveComponent* ServerBas...,
    FName ServerBoneName,
    bool bHasBase,
    bool bBaseRelativePosition,
    uint8 ServerMovementMode
)

Replicate position correction to client when using root motion for movement.

Public function

void

 

ClientAdjustRootMotionSourcePosition

(
    float TimeStamp,
    FRootMotionSourceGroup ServerRootMo...,
    bool bHasAnimRootMotion,
    float ServerMontageTrackPosition,
    FVector ServerLoc,
    FVector_NetQuantizeNormal ServerRot...,
    float ServerVelZ,
    UPrimitiveComponent* ServerBas...,
    FName ServerBoneName,
    bool bHasBase,
    bool bBaseRelativePosition,
    uint8 ServerMovementMode
)

Replicate root motion source correction to client when using root motion for movement.

Public function

void

 

ClientAdjustRootMotionSourcePosition_Implementation

(
    float TimeStamp,
    FRootMotionSourceGroup ServerRootMo...,
    bool bHasAnimRootMotion,
    float ServerMontageTrackPosition,
    FVector ServerLoc,
    FVector_NetQuantizeNormal ServerRot...,
    float ServerVelZ,
    UPrimitiveComponent* ServerBas...,
    FName ServerBoneName,
    bool bHasBase,
    bool bBaseRelativePosition,
    uint8 ServerMovementMode
)

Replicate root motion source correction to client when using root motion for movement.

Public function

void

 

ClientCheatFly()

Public function Virtual

void

 

ClientCheatFly_Implementation()

Public function

void

 

ClientCheatGhost()

Public function Virtual

void

 

ClientCheatGhost_Implementation()

Public function

void

 

ClientCheatWalk()

Public function Virtual

void

 

ClientCheatWalk_Implementation()

Public function

void

 

ClientMoveResponsePacked

(
    const FCharacterMoveResponsePackedB...
)

Client RPC that passes through to CharacterMovement (avoids RPC overhead for components).

Public function

void

 

ClientMoveResponsePacked_Implementation

(
    const FCharacterMoveResponsePackedB...
)

Client RPC that passes through to CharacterMovement (avoids RPC overhead for components).

Public function

bool

 

ClientMoveResponsePacked_Validate

(
    const FCharacterMoveResponsePackedB...
)

Client RPC that passes through to CharacterMovement (avoids RPC overhead for components).

Public function

void

 

ClientVeryShortAdjustPosition

(
    float TimeStamp,
    FVector NewLoc,
    UPrimitiveComponent* NewBase,
    FName NewBaseBoneName,
    bool bHasBase,
    bool bBaseRelativePosition,
    uint8 ServerMovementMode
)

Bandwidth saving version, when velocity is zeroed

Public function

void

 

ClientVeryShortAdjustPosition_Implementation

(
    float TimeStamp,
    FVector NewLoc,
    UPrimitiveComponent* NewBase,
    FName NewBaseBoneName,
    bool bHasBase,
    bool bBaseRelativePosition,
    uint8 ServerMovementMode
)

Bandwidth saving version, when velocity is zeroed

Public function Virtual

void

 

Crouch

(
    bool bClientSimulation
)

Request the character to start crouching.

Public function Virtual

void

 

Falling()

Called when the character's movement enters falling

Public function Const

T *

 

FindComponentByClass()

Public function Const

int32

 

FindRootMotionRepMove

(
    const FAnimMontageInstance& Client...
)

Find usable root motion replicated move from our buffer.

Public function Const

float

 

GetAnimRootMotionTranslationScale()

Returns current value of AnimRootMotionScale

Public function Const

UArrowCompon...

 

GetArrowComponent()

Returns ArrowComponent subobject

Public function Const

const FBased...

 

GetBasedMovement()

Accessor for BasedMovement

Public function Virtual Const

FQuat

 

GetBaseRotationOffset()

Get the saved rotation offset of mesh.

Public function Const

FRotator

 

GetBaseRotationOffsetRotator()

Get the saved rotation offset of mesh.

Public function Const

FVector

 

GetBaseTranslationOffset()

Get the saved translation offset of mesh.

Public function Const

UCapsuleComp...

 

GetCapsuleComponent()

Returns CapsuleComponent subobject

Public function Const

UCharacterMo...

 

GetCharacterMovement()

Returns CharacterMovement subobject

Public function Const

UAnimMontage...

 

GetCurrentMontage()

Return current playing Montage

Public function Virtual Const

float

 

GetJumpMaxHoldTime()

Get the maximum jump time for the character.

Public function Const

USkeletalMes...

 

GetMesh()

END DEPRECATED RPCs.

Public function Const

const FBased...

 

GetReplicatedBasedMovement()

Accessor for ReplicatedBasedMovement

Public function Const

uint8

 

GetReplicatedMovementMode()

Returns ReplicatedMovementMode

Public function Const

float

 

GetReplicatedServerLastTransformUpdateTimeStamp()

Accessor for ReplicatedServerLastTransformUpdateTimeStamp.

Public function Const

FAnimMontage...

 

GetRootMotionAnimMontageInstance()

Get FAnimMontageInstance playing RootMotion

Public function Const

bool

 

HasAnyRootMotion()

True if we are playing root motion from any source right now (anim root motion, root motion source)

Public function Virtual Const

bool

 

IsJumpProvidingForce()

True if jump is actively providing a force, such as when the jump key is held and the time it has been held is less than JumpMaxHoldTime.

Public function Const

bool

 

IsPlayingNetworkedRootMotionMontage()

True if we are playing Root Motion right now, through a Montage with RootMotionMode == ERootMotionMode::RootMotionFromMontagesOnly.

Public function Const

bool

 

IsPlayingRootMotion()

True if we are playing Anim root motion right now

Public function Virtual

void

 

Jump()

Make the character jump on the next update.

Public function

void

 

K2_OnEndCrouch

(
    float HalfHeightAdjust,
    float ScaledHalfHeightAdjust
)

Event when Character stops crouching.

Public function

void

 

K2_OnMovementModeChanged

(
    EMovementMode PrevMovementMode,
    EMovementMode NewMovementMode,
    uint8 PrevCustomMode,
    uint8 NewCustomMode
)

Called from CharacterMovementComponent to notify the character that the movement mode has changed.

Public function

void

 

K2_OnStartCrouch

(
    float HalfHeightAdjust,
    float ScaledHalfHeightAdjust
)

Event when Character crouches.

Public function

void

 

K2_UpdateCustomMovement

(
    float DeltaTime
)

Event for implementing custom character movement mode.

Public function Virtual

void

 

Landed

(
    const FHitResult& Hit
)

Called upon landing when falling, to perform actions based on the Hit result.

Public function Virtual

void

 

LaunchCharacter

(
    FVector LaunchVelocity,
    bool bXYOverride,
    bool bZOverride
)

Set a pending launch velocity on the Character.

Public function Virtual

void

 

MoveBlockedBy

(
    const FHitResult& Impact
)

Called when pawn's movement is blocked

Public function Virtual

void

 

NotifyJumpApex()

Called when character's jump reaches Apex. Needs CharacterMovement->bNotifyApex = true

Public function Virtual

void

 

OnEndCrouch

(
    float HalfHeightAdjust,
    float ScaledHalfHeightAdjust
)

Called when Character stops crouching.

Public function

void

 

OnJumped()

Event fired when the character has just started jumping

Public function Virtual

void

 

OnJumped_Implementation()

Event fired when the character has just started jumping

Public function

void

 

OnLanded

(
    const FHitResult& Hit
)

Called upon landing when falling, to perform actions based on the Hit result.

Public function

void

 

OnLaunched

(
    FVector LaunchVelocity,
    bool bXYOverride,
    bool bZOverride
)

Let blueprint know that we were launched

Public function Virtual

void

 

OnMovementModeChanged

(
    EMovementMode PrevMovementMode,
    uint8 PreviousCustomMode
)

Called from CharacterMovementComponent to notify the character that the movement mode has changed.

Public function Virtual

void

 

OnRep_IsCrouched()

Handle Crouching replicated from server

Public function

void

 

OnRep_ReplayLastTransformUpdateTimeStamp()

Public function Virtual

void

 

OnRep_ReplicatedBasedMovement()

Rep notify for ReplicatedBasedMovement

Public function

void

 

OnRep_RootMotion()

Handles replicated root motion properties on simulated proxies and position correction.

Public function Virtual

void

 

OnStartCrouch

(
    float HalfHeightAdjust,
    float ScaledHalfHeightAdjust
)

Called when Character crouches. Called on non-owned Characters through bIsCrouched replication.

Public function Virtual

void

 

OnUpdateSimulatedPosition

(
    const FVector& OldLocation,
    const FQuat& OldRotation
)

Called on client after position update is received to respond to the new location and rotation.

Public function

void

 

OnWalkingOffLedge

(
    const FVector& PreviousFloorImpact...,
    const FVector& PreviousFloorContac...,
    const FVector& PreviousLocation,
    float TimeDelta
)

Event fired when the Character is walking off a surface and is about to fall because CharacterMovement->CurrentFloor became unwalkable.

Public function Virtual

void

 

OnWalkingOffLedge_Implementation

(
    const FVector& PreviousFloorImpact...,
    const FVector& PreviousFloorContac...,
    const FVector& PreviousLocation,
    float TimeDelta
)

Event fired when the Character is walking off a surface and is about to fall because CharacterMovement->CurrentFloor became unwalkable.

Public function Virtual

float

 

PlayAnimMontage

(
    UAnimMontage* AnimMontage,
    float InPlayRate,
    FName StartSectionName
)

Play Animation Montage on the character mesh.

Public function Virtual

void

 

ResetJumpState()

Marks character as not trying to jump

Public function

bool

 

RestoreReplicatedMove

(
    const FSimulatedRootMotionReplicate...
)

Restore actor to an old buffered move.

Public function

void

 

RootMotionDebugClientPrintOnScreen

(
    const FString& InString
)

Public function Virtual

void

 

RootMotionDebugClientPrintOnScreen_Implementation

(
    const FString& InString
)

Public function

void

 

SaveRelativeBasedMovement

(
    const FVector& NewRelativeLocation,
    const FRotator& NewRotation,
    bool bRelativeRotation
)

Save a new relative location in BasedMovement and a new rotation with is either relative or absolute.

Public function

void

 

ServerMove

(
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 CompressedMoveFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

BEGIN DEPRECATED RPCs that don't use variable sized payloads. Use ServerMovePacked and ClientMoveResponsePacked instead.

Public function

void

 

ServerMove_Implementation

(
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 CompressedMoveFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

BEGIN DEPRECATED RPCs that don't use variable sized payloads. Use ServerMovePacked and ClientMoveResponsePacked instead.

Public function

bool

 

ServerMove_Validate

(
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 CompressedMoveFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

BEGIN DEPRECATED RPCs that don't use variable sized payloads. Use ServerMovePacked and ClientMoveResponsePacked instead.

Public function

void

 

ServerMoveDual

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

void

 

ServerMoveDual_Implementation

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

bool

 

ServerMoveDual_Validate

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

void

 

ServerMoveDualHybridRootMotion

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

void

 

ServerMoveDualHybridRootMotion_Implementation

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

bool

 

ServerMoveDualHybridRootMotion_Validate

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    UPrimitiveComponent* ClientMov...,
    FName ClientBaseBoneName,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

void

 

ServerMoveDualNoBase

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

void

 

ServerMoveDualNoBase_Implementation

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

bool

 

ServerMoveDualNoBase_Validate

(
    float TimeStamp0,
    FVector_NetQuantize10 InAccel0,
    uint8 PendingFlags,
    uint32 View0,
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 NewFlags,
    uint8 ClientRoll,
    uint32 View,
    uint8 ClientMovementMode
)

Replicated function sent by client to server - contains client movement and view info for two moves.

Public function

void

 

ServerMoveNoBase

(
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 CompressedMoveFlags,
    uint8 ClientRoll,
    uint32 View,
    uint8 ClientMovementMode
)

Replicated function sent by client to server.

Public function

void

 

ServerMoveNoBase_Implementation

(
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 CompressedMoveFlags,
    uint8 ClientRoll,
    uint32 View,
    uint8 ClientMovementMode
)

Replicated function sent by client to server.

Public function

bool

 

ServerMoveNoBase_Validate

(
    float TimeStamp,
    FVector_NetQuantize10 InAccel,
    FVector_NetQuantize100 ClientLoc,
    uint8 CompressedMoveFlags,
    uint8 ClientRoll,
    uint32 View,
    uint8 ClientMovementMode
)

Replicated function sent by client to server.

Public function

void

 

ServerMoveOld

(
    float OldTimeStamp,
    FVector_NetQuantize10 OldAccel,
    uint8 OldMoveFlags
)

Resending an (important) old move. Process it if not already processed.

Public function

void

 

ServerMoveOld_Implementation

(
    float OldTimeStamp,
    FVector_NetQuantize10 OldAccel,
    uint8 OldMoveFlags
)

Resending an (important) old move. Process it if not already processed.

Public function

bool

 

ServerMoveOld_Validate

(
    float OldTimeStamp,
    FVector_NetQuantize10 OldAccel,
    uint8 OldMoveFlags
)

Resending an (important) old move. Process it if not already processed.

Public function

void

 

ServerMovePacked

(
    const FCharacterServerMovePackedBit...
)

Server RPC that passes through to CharacterMovement (avoids RPC overhead for components).

Public function

void

 

ServerMovePacked_Implementation

(
    const FCharacterServerMovePackedBit...
)

Server RPC that passes through to CharacterMovement (avoids RPC overhead for components).

Public function

bool

 

ServerMovePacked_Validate

(
    const FCharacterServerMovePackedBit...
)

Server RPC that passes through to CharacterMovement (avoids RPC overhead for components).

Public function

void

 

SetAnimRootMotionTranslationScale

(
    float InAnimRootMotionTranslationSc...
)

Sets scale to apply to root motion translation on this Character

Public function Virtual

void

 

SetBase

(
    UPrimitiveComponent* NewBase,
    const FName BoneName,
    bool bNotifyActor
)

Sets the component the Character is walking on, used by CharacterMovement walking movement to be able to follow dynamic objects.

Public function Virtual

bool

 

ShouldNotifyLanded

(
    const FHitResult& Hit
)

Returns true if the Landed() event should be called.

Public function

void

 

SimulatedRootMotionPositionFixup

(
    float DeltaSeconds
)

Position fix up for Simulated Proxies playing Root Motion

Public function Virtual

void

 

StopAnimMontage

(
    UAnimMontage* AnimMontage
)

Stop Animation Montage.

Public function Virtual

void

 

StopJumping()

Stop the character from jumping on the next update.

Public function Virtual

void

 

UnCrouch

(
    bool bClientSimulation
)

Request the character to stop crouching.

Overridden from APawn

Name Description

Public function Virtual

void

 

DisplayDebug

(
    UCanvas* Canvas,
    const FDebugDisplayInfo& DebugDisp...,
    float& YL,
    float& YPos
)

Public function Virtual Const

float

 

GetDefaultHalfHeight()

Returns The half-height of the default Pawn, scaled by the component scale.

Public function Virtual Const

UPrimitiveCo...

 

GetMovementBase()

Return PrimitiveComponent we are based on (standing on, attached to, and moving on).

Public function Virtual Const

UPawnMovemen...

 

GetMovementComponent()

Return our PawnMovementComponent, if we have one.

Public function Virtual

void

 

PawnClientRestart()

Tell client that the Pawn is begin restarted.

Public function Virtual

void

 

PossessedBy

(
    AController* NewController
)

Called when this Pawn is possessed. Only called on the server (or in standalone).

Public function Virtual

void

 

RecalculateBaseEyeHeight()

Set BaseEyeHeight based on current state.

Public function Virtual

void

 

Restart()

Called when the Pawn is being restarted (usually by being possessed by a Controller).

Public function Virtual

void

 

SetupPlayerInputComponent

(
    UInputComponent* PlayerInputCo...
)

Allows a Pawn to set up custom input bindings.

Public function Virtual

void

 

TurnOff()

Freeze pawn - stop sounds, animations, physics, weapon firing

Public function Virtual

void

 

UnPossessed()

Called when our Controller no longer possesses us.

Public function Virtual

void

 

UpdateNavigationRelevance()

Update all components relevant for navigation generators to match bCanAffectNavigationGeneration flag

Overridden from AActor

Name Description

Public function Virtual

void

 

BeginPlay()

Overridable native event for when play begins for this actor.

Public function Virtual

void

 

ClearCrossLevelReferences()

Do anything needed to clear out cross level references; Called from ULevel::PreSave

Public function Virtual Const

UActorCompon...

 

FindComponentByClass

(
    const TSubclassOf< UActorComponent ...
)

Searches components array and returns first encountered component of the specified class, native version of GetComponentByClass

Public function Virtual Const

void

 

GetSimpleCollisionCylinder

(
    float& CollisionRadius,
    float& CollisionHalfHeight
)

Get axis-aligned cylinder around this actor, used for simple collision checks (ie Pawns reaching a destination).

Public function Virtual

void

 

NotifyActorBeginOverlap

(
    AActor* OtherActor
)

Event when this actor overlaps another actor, for example a player walking into a trigger.

Public function Virtual

void

 

NotifyActorEndOverlap

(
    AActor* OtherActor
)

Event when an actor no longer overlaps another actor, and they have separated.

Public function Virtual

void

 

OnRep_ReplicatedMovement()

ReplicatedMovement struct replication event

Public function Virtual

void

 

PostInitializeComponents()

Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay

Public function Virtual

void

 

PostNetReceiveLocationAndRotation()

Update location and rotation from ReplicatedMovement. Not called for simulated physics!

Public function Virtual

void

 

PreReplication

(
    IRepChangedPropertyTracker& Change...
)

Called on the actor right before replication occurs.

Public function Virtual

void

 

PreReplicationForReplay

(
    IRepChangedPropertyTracker& Change...
)

Called on the actor right before replication occurs.

Public function Virtual

void

 

SetReplicateMovement

(
    bool bInReplicateMovement
)

Set whether this actor's movement replicates to network clients.

Public function Virtual

void

 

TornOff()

Networking - called on client when actor is torn off (bTearOff==true), meaning it's no longer replicated to clients.

Overridden from UObject

Name Description

Public function Virtual Const

void

 

GetLifetimeReplicatedProps

(
    TArray< FLifetimeProperty >& OutLi...
)

Returns the properties used for network replication, this needs to be overridden by all actor classes with native replicated properties

Public function Virtual

void

 

PostNetReceive()

Always called immediately after properties are received from the remote.

Public function Virtual

void

 

PreNetReceive()

Always called immediately before properties are received from the remote.

Overridden from INavAgentInterface

Name Description

Public function Virtual Const

FVector

 

GetNavAgentLocation()

Basically retrieved pawn's location on navmesh

Constants

Name

Description

CapsuleComponentName

Name of the CapsuleComponent.

CharacterMovementComponentName

Name of the CharacterMovement component.

MeshComponentName

Name of the MeshComponent.

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss