UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ACharacter Class Reference

#include <Character.h>

+ Inheritance diagram for ACharacter:

Public Member Functions

ENGINE_API ACharacter (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get())
 
virtual ENGINE_API void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 
virtual ENGINE_API void GetReplicatedCustomConditionState (FCustomPropertyConditionState &OutActiveState) const override
 
ENGINE_API void ServerMovePacked (const FCharacterServerMovePackedBits &PackedBits)
 
ENGINE_API void ServerMovePacked_Implementation (const FCharacterServerMovePackedBits &PackedBits)
 
ENGINE_API bool ServerMovePacked_Validate (const FCharacterServerMovePackedBits &PackedBits)
 
ENGINE_API void ClientMoveResponsePacked (const FCharacterMoveResponsePackedBits &PackedBits)
 
ENGINE_API void ClientMoveResponsePacked_Implementation (const FCharacterMoveResponsePackedBits &PackedBits)
 
ENGINE_API bool ClientMoveResponsePacked_Validate (const FCharacterMoveResponsePackedBits &PackedBits)
 
ENGINE_API void ServerMove (float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API void ServerMove_Implementation (float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API bool ServerMove_Validate (float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API void ServerMoveNoBase (float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, uint8 ClientMovementMode)
 
ENGINE_API void ServerMoveNoBase_Implementation (float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, uint8 ClientMovementMode)
 
ENGINE_API bool ServerMoveNoBase_Validate (float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, uint8 ClientMovementMode)
 
ENGINE_API 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 *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API 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 *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API 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 *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API 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)
 
ENGINE_API 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)
 
ENGINE_API 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)
 
ENGINE_API 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 *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API 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 *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API 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 *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
 
ENGINE_API void ServerMoveOld (float OldTimeStamp, FVector_NetQuantize10 OldAccel, uint8 OldMoveFlags)
 
ENGINE_API void ServerMoveOld_Implementation (float OldTimeStamp, FVector_NetQuantize10 OldAccel, uint8 OldMoveFlags)
 
ENGINE_API bool ServerMoveOld_Validate (float OldTimeStamp, FVector_NetQuantize10 OldAccel, uint8 OldMoveFlags)
 
ENGINE_API void ClientAckGoodMove (float TimeStamp)
 
ENGINE_API void ClientAckGoodMove_Implementation (float TimeStamp)
 
ENGINE_API void ClientAdjustPosition (float TimeStamp, FVector NewLoc, FVector NewVel, UPrimitiveComponent *NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)
 
ENGINE_API void ClientAdjustPosition_Implementation (float TimeStamp, FVector NewLoc, FVector NewVel, UPrimitiveComponent *NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)
 
ENGINE_API void ClientVeryShortAdjustPosition (float TimeStamp, FVector NewLoc, UPrimitiveComponent *NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)
 
ENGINE_API void ClientVeryShortAdjustPosition_Implementation (float TimeStamp, FVector NewLoc, UPrimitiveComponent *NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)
 
ENGINE_API void ClientAdjustRootMotionPosition (float TimeStamp, float ServerMontageTrackPosition, FVector ServerLoc, FVector_NetQuantizeNormal ServerRotation, float ServerVelZ, UPrimitiveComponent *ServerBase, FName ServerBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)
 
ENGINE_API void ClientAdjustRootMotionPosition_Implementation (float TimeStamp, float ServerMontageTrackPosition, FVector ServerLoc, FVector_NetQuantizeNormal ServerRotation, float ServerVelZ, UPrimitiveComponent *ServerBase, FName ServerBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)
 
ENGINE_API void ClientAdjustRootMotionSourcePosition (float TimeStamp, FRootMotionSourceGroup ServerRootMotion, bool bHasAnimRootMotion, float ServerMontageTrackPosition, FVector ServerLoc, FVector_NetQuantizeNormal ServerRotation, float ServerVelZ, UPrimitiveComponent *ServerBase, FName ServerBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)
 
ENGINE_API void ClientAdjustRootMotionSourcePosition_Implementation (float TimeStamp, FRootMotionSourceGroup ServerRootMotion, bool bHasAnimRootMotion, float ServerMontageTrackPosition, FVector ServerLoc, FVector_NetQuantizeNormal ServerRotation, float ServerVelZ, UPrimitiveComponent *ServerBase, FName ServerBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)
 
class USkeletalMeshComponent * GetMesh () const
 
template<class T >
T * GetCharacterMovement () const
 
UCharacterMovementComponentGetCharacterMovement () const
 
class UCapsuleComponentGetCapsuleComponent () const
 
virtual ENGINE_API void SetBase (UPrimitiveComponent *NewBase, const FName BoneName=NAME_None, bool bNotifyActor=true)
 
virtual ENGINE_API void CacheInitialMeshOffset (FVector MeshRelativeLocation, FRotator MeshRelativeRotation)
 
virtual ENGINE_API void OnRep_ReplicatedBasedMovement ()
 
virtual ENGINE_API void SetReplicateMovement (bool bInReplicateMovement) override
 
ENGINE_API void OnRep_ReplayLastTransformUpdateTimeStamp ()
 
float GetReplicatedServerLastTransformUpdateTimeStamp () const
 
float GetReplayLastTransformUpdateTimeStamp () const
 
const FBasedMovementInfoGetBasedMovement () const
 
const FBasedMovementInfoGetReplicatedBasedMovement () const
 
ENGINE_API void SaveRelativeBasedMovement (const FVector &NewRelativeLocation, const FRotator &NewRotation, bool bRelativeRotation)
 
uint8 GetReplicatedMovementMode () const
 
FVector GetBaseTranslationOffset () const
 
virtual FQuat GetBaseRotationOffset () const
 
FRotator GetBaseRotationOffsetRotator () const
 
virtual ENGINE_API FVector GetGravityDirection () const override
 
virtual ENGINE_API FQuat GetGravityTransform () const override
 
virtual ENGINE_API FVector GetReplicatedGravityDirection () const
 
virtual ENGINE_API void OnRep_IsCrouched ()
 
virtual ENGINE_API void PostLoad () override
 
virtual ENGINE_API void BeginPlay () override
 
virtual ENGINE_API void ClearCrossLevelReferences () override
 
virtual ENGINE_API void PreNetReceive () override
 
virtual ENGINE_API void PostNetReceive () override
 
virtual ENGINE_API void GatherCurrentMovement () override
 
virtual ENGINE_API void OnRep_ReplicatedMovement () override
 
virtual ENGINE_API void PostNetReceiveLocationAndRotation () override
 
virtual ENGINE_API void GetSimpleCollisionCylinder (float &CollisionRadius, float &CollisionHalfHeight) const override
 
virtual ENGINE_API UActorComponentFindComponentByClass (const TSubclassOf< UActorComponent > ComponentClass) const override
 
virtual ENGINE_API void TornOff () override
 
virtual ENGINE_API void NotifyActorBeginOverlap (AActor *OtherActor)
 
virtual ENGINE_API void NotifyActorEndOverlap (AActor *OtherActor)
 
template<class T >
T * FindComponentByClass () const
 
virtual ENGINE_API FVector GetNavAgentLocation () const override
 
virtual ENGINE_API void PostInitializeComponents () override
 
virtual ENGINE_API UPawnMovementComponentGetMovementComponent () const override
 
virtual UPrimitiveComponent * GetMovementBase () const override final
 
virtual ENGINE_API float GetDefaultHalfHeight () const override
 
virtual ENGINE_API void TurnOff () override
 
virtual ENGINE_API void Restart () override
 
virtual ENGINE_API void PawnClientRestart () override
 
virtual ENGINE_API void PossessedBy (AController *NewController) override
 
virtual ENGINE_API void UnPossessed () override
 
virtual ENGINE_API void SetupPlayerInputComponent (class UInputComponent *PlayerInputComponent) override
 
virtual ENGINE_API void DisplayDebug (class UCanvas *Canvas, const FDebugDisplayInfo &DebugDisplay, float &YL, float &YPos) override
 
virtual ENGINE_API void RecalculateBaseEyeHeight () override
 
virtual ENGINE_API void UpdateNavigationRelevance () override
 
virtual ENGINE_API void ApplyDamageMomentum (float DamageTaken, FDamageEvent const &DamageEvent, APawn *PawnInstigator, AActor *DamageCauser)
 
virtual ENGINE_API void Jump ()
 
virtual ENGINE_API void StopJumping ()
 
ENGINE_API bool CanJump () const
 
bool GetProxyIsJumpForceApplied () const
 
ENGINE_API void SetProxyIsJumpForceApplied (const bool bInProxyIsJumpForceApplied)
 
ENGINE_API bool IsCrouched () const
 
ENGINE_API void SetIsCrouched (const bool bInIsCrouched)
 
virtual ENGINE_API void ResetJumpState ()
 
virtual ENGINE_API bool IsJumpProvidingForce () const
 
virtual ENGINE_API float PlayAnimMontage (class UAnimMontage *AnimMontage, float InPlayRate=1.f, FName StartSectionName=NAME_None)
 
virtual ENGINE_API void StopAnimMontage (class UAnimMontage *AnimMontage=nullptr)
 
ENGINE_API class UAnimMontageGetCurrentMontage () const
 
virtual ENGINE_API void LaunchCharacter (FVector LaunchVelocity, bool bXYOverride, bool bZOverride)
 
ENGINE_API void OnLaunched (FVector LaunchVelocity, bool bXYOverride, bool bZOverride)
 
ENGINE_API void OnJumped ()
 
virtual ENGINE_API void OnJumped_Implementation ()
 
virtual void Falling ()
 
virtual ENGINE_API void NotifyJumpApex ()
 
virtual ENGINE_API void Landed (const FHitResult &Hit)
 
ENGINE_API void OnLanded (const FHitResult &Hit)
 
ENGINE_API void OnWalkingOffLedge (const FVector &PreviousFloorImpactNormal, const FVector &PreviousFloorContactNormal, const FVector &PreviousLocation, float TimeDelta)
 
virtual ENGINE_API void OnWalkingOffLedge_Implementation (const FVector &PreviousFloorImpactNormal, const FVector &PreviousFloorContactNormal, const FVector &PreviousLocation, float TimeDelta)
 
virtual void MoveBlockedBy (const FHitResult &Impact)
 
virtual ENGINE_API void Crouch (bool bClientSimulation=false)
 
virtual ENGINE_API void UnCrouch (bool bClientSimulation=false)
 
virtual ENGINE_API bool CanCrouch () const
 
virtual ENGINE_API void OnEndCrouch (float HalfHeightAdjust, float ScaledHalfHeightAdjust)
 
ENGINE_API void K2_OnEndCrouch (float HalfHeightAdjust, float ScaledHalfHeightAdjust)
 
virtual ENGINE_API void OnStartCrouch (float HalfHeightAdjust, float ScaledHalfHeightAdjust)
 
ENGINE_API void K2_OnStartCrouch (float HalfHeightAdjust, float ScaledHalfHeightAdjust)
 
ENGINE_API void RecalculateCrouchedEyeHeight ()
 
virtual ENGINE_API void OnMovementModeChanged (EMovementMode PrevMovementMode, uint8 PreviousCustomMode=0)
 
ENGINE_API void K2_OnMovementModeChanged (EMovementMode PrevMovementMode, EMovementMode NewMovementMode, uint8 PrevCustomMode, uint8 NewCustomMode)
 
ENGINE_API void K2_UpdateCustomMovement (float DeltaTime)
 
virtual ENGINE_API bool ShouldNotifyLanded (const struct FHitResult &Hit)
 
virtual ENGINE_API void CheckJumpInput (float DeltaTime)
 
virtual ENGINE_API void ClearJumpInput (float DeltaTime)
 
virtual ENGINE_API float GetJumpMaxHoldTime () const
 
ENGINE_API void ClientCheatWalk ()
 
virtual ENGINE_API void ClientCheatWalk_Implementation ()
 
ENGINE_API void ClientCheatFly ()
 
virtual ENGINE_API void ClientCheatFly_Implementation ()
 
ENGINE_API void ClientCheatGhost ()
 
virtual ENGINE_API void ClientCheatGhost_Implementation ()
 
ENGINE_API void RootMotionDebugClientPrintOnScreen (const FString &InString)
 
virtual ENGINE_API void RootMotionDebugClientPrintOnScreen_Implementation (const FString &InString)
 
ENGINE_API int32 FindRootMotionRepMove (const FAnimMontageInstance &ClientMontageInstance) const
 
ENGINE_API bool CanUseRootMotionRepMove (const FSimulatedRootMotionReplicatedMove &RootMotionRepMove, const FAnimMontageInstance &ClientMontageInstance) const
 
ENGINE_API bool RestoreReplicatedMove (const FSimulatedRootMotionReplicatedMove &RootMotionRepMove)
 
virtual ENGINE_API void OnUpdateSimulatedPosition (const FVector &OldLocation, const FQuat &OldRotation)
 
const FRepRootMotionMontageGetRepRootMotion () const
 
ENGINE_API FRepRootMotionMontageGetRepRootMotion_Mutable ()
 
ENGINE_API void SetRepRootMotion (const FRepRootMotionMontage &InRepRootMotion)
 
ENGINE_API void OnRep_RootMotion ()
 
ENGINE_API void SimulatedRootMotionPositionFixup (float DeltaSeconds)
 
ENGINE_API FAnimMontageInstanceGetRootMotionAnimMontageInstance () const
 
ENGINE_API bool IsPlayingRootMotion () const
 
ENGINE_API bool HasAnyRootMotion () const
 
ENGINE_API bool IsPlayingNetworkedRootMotionMontage () const
 
ENGINE_API void SetAnimRootMotionTranslationScale (float InAnimRootMotionTranslationScale=1.f)
 
ENGINE_API float GetAnimRootMotionTranslationScale () const
 
virtual ENGINE_API void PreReplication (IRepChangedPropertyTracker &ChangedPropertyTracker) override
 
virtual ENGINE_API void PreReplicationForReplay (IRepChangedPropertyTracker &ChangedPropertyTracker) override
 
ENGINE_API void FillAsyncInput (FCharacterAsyncInput &Input) const
 
ENGINE_API void InitializeAsyncOutput (FCharacterAsyncOutput &Output) const
 
ENGINE_API void ApplyAsyncOutput (const FCharacterAsyncOutput &Output)
 

Public Attributes

float CrouchedEyeHeight
 
uint8 bIsCrouched:1
 
uint8 bProxyIsJumpForceApplied: 1
 
uint8 bPressedJump:1
 
uint8 bClientUpdating:1
 
uint8 bClientWasFalling:1
 
uint8 bClientResimulateRootMotion:1
 
uint8 bClientResimulateRootMotionSources:1
 
uint8 bSimGravityDisabled:1
 
uint8 bClientCheckEncroachmentOnNetUpdate:1
 
uint8 bServerMoveIgnoreRootMotion:1
 
uint8 bWasJumping: 1
 
float JumpKeyHoldTime
 
float JumpForceTimeRemaining
 
float ProxyJumpForceStartedTime
 
float JumpMaxHoldTime
 
int32 JumpMaxCount
 
int32 JumpCurrentCount
 
int32 JumpCurrentCountPreJump
 
uint32 NumActorOverlapEventsCounter
 
FCharacterReachedApexSignature OnReachedJumpApex
 
FLandedSignature LandedDelegate
 
FMovementModeChangedSignature MovementModeChangedDelegate
 
FCharacterMovementUpdatedSignature OnCharacterMovementUpdated
 
FRootMotionSourceGroup SavedRootMotion
 
FRootMotionMovementParams ClientRootMotionParams
 
TArray< FSimulatedRootMotionReplicatedMoveRootMotionRepMoves
 
struct FRepRootMotionMontage RepRootMotion
 

Static Public Attributes

static ENGINE_API FName MeshComponentName
 
static ENGINE_API FName CharacterMovementComponentName
 
static ENGINE_API FName CapsuleComponentName
 

Protected Member Functions

ENGINE_API FBasedMovementInfoGetReplicatedBasedMovement_Mutable ()
 
ENGINE_API void SetReplicatedBasedMovement (const FBasedMovementInfo &InReplicatedBasedMovement)
 
virtual bool ShouldReplicateAcceleration () const
 
virtual ENGINE_API void BaseChange ()
 
ENGINE_API void SetReplicatedServerLastTransformUpdateTimeStamp (const float InReplicatedServerLastTransformUpdateTimeStamp)
 
ENGINE_API void SetReplayLastTransformUpdateTimeStamp (const float InReplayLastTransformUpdateTimeStamp)
 
ENGINE_API void SetReplicatedGravityDirection (const FVector &InReplicatedGravityDirection)
 
ENGINE_API void SetReplicatedMovementMode (const uint8 InReplicatedMovementMode)
 
ENGINE_API bool CanJumpInternal () const
 
virtual ENGINE_API bool CanJumpInternal_Implementation () const
 
ENGINE_API bool JumpIsAllowedInternal () const
 

Protected Attributes

struct FBasedMovementInfo BasedMovement
 
struct FBasedMovementInfo ReplicatedBasedMovement
 
float ReplicatedServerLastTransformUpdateTimeStamp
 
float ReplayLastTransformUpdateTimeStamp
 
FQuat BaseRotationOffset
 
FVector BaseTranslationOffset
 
FVector_NetQuantizeNormal ReplicatedGravityDirection
 
FVector_NetQuantizeNormal PreNetReceivedGravityDirection
 
float AnimRootMotionTranslationScale
 
uint8 bInBaseReplication:1
 
uint8 ReplicatedMovementMode
 

Detailed Description

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.

See also
APawn, UCharacterMovementComponent
https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Pawn/Character/

Constructor & Destructor Documentation

◆ ACharacter()

ACharacter::ACharacter ( const FObjectInitializer ObjectInitializer = FObjectInitializer::Get())

Default UObject constructor.

Member Function Documentation

◆ ApplyAsyncOutput()

void ACharacter::ApplyAsyncOutput ( const FCharacterAsyncOutput Output)

◆ ApplyDamageMomentum()

void ACharacter::ApplyDamageMomentum ( float  DamageTaken,
FDamageEvent const &  DamageEvent,
APawn *  PawnInstigator,
AActor DamageCauser 
)
virtual

Apply momentum caused by damage.

◆ BaseChange()

void ACharacter::BaseChange ( )
protectedvirtual

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

◆ BeginPlay()

void ACharacter::BeginPlay ( )
overridevirtual

◆ CacheInitialMeshOffset()

void ACharacter::CacheInitialMeshOffset ( FVector  MeshRelativeLocation,
FRotator  MeshRelativeRotation 
)
virtual

Cache mesh offset from capsule. This is used as the target for network smoothing interpolation, when the mesh is offset with lagged smoothing. This is automatically called during initialization; call this at runtime if you intend to change the default mesh offset from the capsule.

See also
GetBaseTranslationOffset(), GetBaseRotationOffset()

◆ CanCrouch()

bool ACharacter::CanCrouch ( ) const
virtual
Returns
true if this character is currently able to crouch (and is not currently crouched)

◆ CanJump()

bool ACharacter::CanJump ( ) const

Check if the character can jump in the current state.

The default implementation may be overridden or extended by implementing the custom CanJump event in Blueprints.

@Return Whether the character can jump in the current state.

◆ CanJumpInternal()

ENGINE_API bool ACharacter::CanJumpInternal ( ) const
protected

Customizable event to check if the character can jump in the current state. Default implementation returns true if the character is on the ground and not crouching, has a valid CharacterMovementComponent and CanEverJump() returns true. Default implementation also allows for 'hold to jump higher' functionality: As well as returning true when on the ground, it also returns true when GetMaxJumpTime is more than zero and IsJumping returns true.

@Return Whether the character can jump in the current state.

◆ CanJumpInternal_Implementation()

bool ACharacter::CanJumpInternal_Implementation ( ) const
protectedvirtual

◆ CanUseRootMotionRepMove()

bool ACharacter::CanUseRootMotionRepMove ( const FSimulatedRootMotionReplicatedMove RootMotionRepMove,
const FAnimMontageInstance ClientMontageInstance 
) const

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

◆ CheckJumpInput()

void ACharacter::CheckJumpInput ( float  DeltaTime)
virtual

Trigger jump if jump button has been pressed.

◆ ClearCrossLevelReferences()

void ACharacter::ClearCrossLevelReferences ( )
overridevirtual

◆ ClearJumpInput()

void ACharacter::ClearJumpInput ( float  DeltaTime)
virtual

Update jump input state after having checked input.

◆ ClientAckGoodMove()

ENGINE_API void ACharacter::ClientAckGoodMove ( float  TimeStamp)

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

◆ ClientAckGoodMove_Implementation()

void ACharacter::ClientAckGoodMove_Implementation ( float  TimeStamp)

◆ ClientAdjustPosition()

ENGINE_API void ACharacter::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. Client will replay subsequent moves after applying adjustment.

◆ ClientAdjustPosition_Implementation()

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

◆ ClientAdjustRootMotionPosition()

ENGINE_API void ACharacter::ClientAdjustRootMotionPosition ( float  TimeStamp,
float  ServerMontageTrackPosition,
FVector  ServerLoc,
FVector_NetQuantizeNormal  ServerRotation,
float  ServerVelZ,
UPrimitiveComponent *  ServerBase,
FName  ServerBoneName,
bool  bHasBase,
bool  bBaseRelativePosition,
uint8  ServerMovementMode 
)

Replicate position correction to client when using root motion for movement. (animation root motion specific)

◆ ClientAdjustRootMotionPosition_Implementation()

void ACharacter::ClientAdjustRootMotionPosition_Implementation ( float  TimeStamp,
float  ServerMontageTrackPosition,
FVector  ServerLoc,
FVector_NetQuantizeNormal  ServerRotation,
float  ServerVelZ,
UPrimitiveComponent *  ServerBase,
FName  ServerBoneName,
bool  bHasBase,
bool  bBaseRelativePosition,
uint8  ServerMovementMode 
)

◆ ClientAdjustRootMotionSourcePosition()

ENGINE_API void ACharacter::ClientAdjustRootMotionSourcePosition ( float  TimeStamp,
FRootMotionSourceGroup  ServerRootMotion,
bool  bHasAnimRootMotion,
float  ServerMontageTrackPosition,
FVector  ServerLoc,
FVector_NetQuantizeNormal  ServerRotation,
float  ServerVelZ,
UPrimitiveComponent *  ServerBase,
FName  ServerBoneName,
bool  bHasBase,
bool  bBaseRelativePosition,
uint8  ServerMovementMode 
)

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

◆ ClientAdjustRootMotionSourcePosition_Implementation()

void ACharacter::ClientAdjustRootMotionSourcePosition_Implementation ( float  TimeStamp,
FRootMotionSourceGroup  ServerRootMotion,
bool  bHasAnimRootMotion,
float  ServerMontageTrackPosition,
FVector  ServerLoc,
FVector_NetQuantizeNormal  ServerRotation,
float  ServerVelZ,
UPrimitiveComponent *  ServerBase,
FName  ServerBoneName,
bool  bHasBase,
bool  bBaseRelativePosition,
uint8  ServerMovementMode 
)

◆ ClientCheatFly()

ENGINE_API void ACharacter::ClientCheatFly ( )

◆ ClientCheatFly_Implementation()

void ACharacter::ClientCheatFly_Implementation ( )
virtual

◆ ClientCheatGhost()

ENGINE_API void ACharacter::ClientCheatGhost ( )

◆ ClientCheatGhost_Implementation()

void ACharacter::ClientCheatGhost_Implementation ( )
virtual

◆ ClientCheatWalk()

ENGINE_API void ACharacter::ClientCheatWalk ( )

◆ ClientCheatWalk_Implementation()

void ACharacter::ClientCheatWalk_Implementation ( )
virtual

◆ ClientMoveResponsePacked()

ENGINE_API void ACharacter::ClientMoveResponsePacked ( const FCharacterMoveResponsePackedBits PackedBits)

◆ ClientMoveResponsePacked_Implementation()

void ACharacter::ClientMoveResponsePacked_Implementation ( const FCharacterMoveResponsePackedBits PackedBits)

◆ ClientMoveResponsePacked_Validate()

bool ACharacter::ClientMoveResponsePacked_Validate ( const FCharacterMoveResponsePackedBits PackedBits)

◆ ClientVeryShortAdjustPosition()

ENGINE_API void ACharacter::ClientVeryShortAdjustPosition ( float  TimeStamp,
FVector  NewLoc,
UPrimitiveComponent *  NewBase,
FName  NewBaseBoneName,
bool  bHasBase,
bool  bBaseRelativePosition,
uint8  ServerMovementMode 
)

◆ ClientVeryShortAdjustPosition_Implementation()

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

◆ Crouch()

void ACharacter::Crouch ( bool  bClientSimulation = false)
virtual

Request the character to start crouching. The request is processed on the next update of the CharacterMovementComponent.

See also
OnStartCrouch
IsCrouched
CharacterMovement->WantsToCrouch

◆ DisplayDebug()

void ACharacter::DisplayDebug ( class UCanvas Canvas,
const FDebugDisplayInfo DebugDisplay,
float YL,
float YPos 
)
overridevirtual

◆ Falling()

virtual void ACharacter::Falling ( )
inlinevirtual

Called when the character's movement enters falling

◆ FillAsyncInput()

void ACharacter::FillAsyncInput ( FCharacterAsyncInput Input) const

Async simulation API

◆ FindComponentByClass() [1/2]

template<class T >
T * ACharacter::FindComponentByClass ( ) const
inline

◆ FindComponentByClass() [2/2]

UActorComponent * ACharacter::FindComponentByClass ( const TSubclassOf< UActorComponent ComponentClass) const
overridevirtual

◆ FindRootMotionRepMove()

int32 ACharacter::FindRootMotionRepMove ( const FAnimMontageInstance ClientMontageInstance) const

Find usable root motion replicated move from our buffer. Goes through the buffer back in time, to find the first move that clears 'CanUseRootMotionRepMove' below. Returns index of that move or INDEX_NONE otherwise.

◆ GatherCurrentMovement()

void ACharacter::GatherCurrentMovement ( )
overridevirtual

◆ GetAnimRootMotionTranslationScale()

float ACharacter::GetAnimRootMotionTranslationScale ( ) const

Scale to apply to root motion translation on this Character. Returns current value of AnimRootMotionScale.

◆ GetBasedMovement()

const FBasedMovementInfo & ACharacter::GetBasedMovement ( ) const
inline

Accessor for BasedMovement

◆ GetBaseRotationOffset()

virtual FQuat ACharacter::GetBaseRotationOffset ( ) const
inlinevirtual

Get the saved rotation offset of mesh. This is how much extra rotation is applied from the capsule rotation.

◆ GetBaseRotationOffsetRotator()

FRotator ACharacter::GetBaseRotationOffsetRotator ( ) const
inline

Get the saved rotation offset of mesh. This is how much extra rotation is applied from the capsule rotation.

◆ GetBaseTranslationOffset()

FVector ACharacter::GetBaseTranslationOffset ( ) const
inline

Get the saved translation offset of mesh. This is how much extra offset is applied from the center of the capsule.

◆ GetCapsuleComponent()

class UCapsuleComponent * ACharacter::GetCapsuleComponent ( ) const
inline

Returns CapsuleComponent subobject

◆ GetCharacterMovement() [1/2]

template<class T >
T * ACharacter::GetCharacterMovement ( ) const
inline

Returns CharacterMovement subobject

◆ GetCharacterMovement() [2/2]

UCharacterMovementComponent * ACharacter::GetCharacterMovement ( ) const
inline

◆ GetCurrentMontage()

class UAnimMontage * ACharacter::GetCurrentMontage ( ) const

Return current playing Montage

◆ GetDefaultHalfHeight()

float ACharacter::GetDefaultHalfHeight ( ) const
overridevirtual

◆ GetGravityDirection()

FVector ACharacter::GetGravityDirection ( ) const
overridevirtual

Returns vector direction of gravity

◆ GetGravityTransform()

FQuat ACharacter::GetGravityTransform ( ) const
overridevirtual

Returns a quaternion transforming from world space into gravity relative space

◆ GetJumpMaxHoldTime()

float ACharacter::GetJumpMaxHoldTime ( ) const
virtual

Get the maximum jump time for the character. Note that if StopJumping() is not called before the max jump hold time is reached, then the character will carry on receiving vertical velocity. Therefore it is usually best to call StopJumping() when jump input has ceased (such as a button up event).

Returns
Maximum jump time for the character

◆ GetLifetimeReplicatedProps()

void ACharacter::GetLifetimeReplicatedProps ( TArray< FLifetimeProperty > &  OutLifetimeProps) const
overridevirtual

◆ GetMesh()

class USkeletalMeshComponent * ACharacter::GetMesh ( ) const
inline

Returns Mesh subobject

◆ GetMovementBase()

virtual UPrimitiveComponent * ACharacter::GetMovementBase ( ) const
inlinefinaloverridevirtual

◆ GetMovementComponent()

UPawnMovementComponent * ACharacter::GetMovementComponent ( ) const
overridevirtual

◆ GetNavAgentLocation()

FVector ACharacter::GetNavAgentLocation ( ) const
overridevirtual

◆ GetProxyIsJumpForceApplied()

bool ACharacter::GetProxyIsJumpForceApplied ( ) const
inline

Indicates that this Character is currently under the force of a jump (if JumpMaxHoldTime is non-zero). IsJumpProvidingForce() handles this as well. This function returns bProxyIsJumpForceApplied

◆ GetReplayLastTransformUpdateTimeStamp()

float ACharacter::GetReplayLastTransformUpdateTimeStamp ( ) const
inline

This is updated every frame to the latest timestamp, but only replicated to Replays, this is because we want to save positions to the replay replication connection each frame to ensure smooth movement. This is the Accessor for ReplayLastTransformUpdateTimeStamp.

◆ GetReplicatedBasedMovement()

const FBasedMovementInfo & ACharacter::GetReplicatedBasedMovement ( ) const
inline

Accessor for ReplicatedBasedMovement

◆ GetReplicatedBasedMovement_Mutable()

FBasedMovementInfo & ACharacter::GetReplicatedBasedMovement_Mutable ( )
protected

This is the Replicated version of relative movement. Do not modify on simulated proxies! Returns non-const ReplicatedBasedMovement.

◆ GetReplicatedCustomConditionState()

void ACharacter::GetReplicatedCustomConditionState ( FCustomPropertyConditionState OutActiveState) const
overridevirtual

◆ GetReplicatedGravityDirection()

FVector ACharacter::GetReplicatedGravityDirection ( ) const
virtual

Returns replicated gravity direction for simulated proxies

◆ GetReplicatedMovementMode()

uint8 ACharacter::GetReplicatedMovementMode ( ) const
inline

CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. Use CharacterMovementComponent::UnpackNetworkMovementMode() to translate it. Returns ReplicatedMovementMode

◆ GetReplicatedServerLastTransformUpdateTimeStamp()

float ACharacter::GetReplicatedServerLastTransformUpdateTimeStamp ( ) const
inline

This is the value of the CharacterMovement timestamp, and is replicated down to SimulatedProxies to assist with visual smoothing of the character. May not be updated every frame to reduce bandwidth. This is the Accessor for ReplicatedServerLastTransformUpdateTimeStamp.

◆ GetRepRootMotion()

const FRepRootMotionMontage & ACharacter::GetRepRootMotion ( ) const
inline

Replicated Root Motion montage. Returns RepRootMotion

◆ GetRepRootMotion_Mutable()

FRepRootMotionMontage & ACharacter::GetRepRootMotion_Mutable ( )

Replicated Root Motion montage. Returns non-const RepRootMotion

◆ GetRootMotionAnimMontageInstance()

FAnimMontageInstance * ACharacter::GetRootMotionAnimMontageInstance ( ) const

Get FAnimMontageInstance playing RootMotion

◆ GetSimpleCollisionCylinder()

void ACharacter::GetSimpleCollisionCylinder ( float CollisionRadius,
float CollisionHalfHeight 
) const
overridevirtual

◆ HasAnyRootMotion()

bool ACharacter::HasAnyRootMotion ( ) const

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

◆ InitializeAsyncOutput()

void ACharacter::InitializeAsyncOutput ( FCharacterAsyncOutput Output) const

◆ IsCrouched()

bool ACharacter::IsCrouched ( ) const

Set by character movement to specify that this Character is currently crouched. This function returns bIsCrouched.

◆ IsJumpProvidingForce()

bool ACharacter::IsJumpProvidingForce ( ) const
virtual

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.

See also
CharacterMovement->IsFalling

◆ IsPlayingNetworkedRootMotionMontage()

bool ACharacter::IsPlayingNetworkedRootMotionMontage ( ) const

True if we are playing Root Motion right now, through a Montage with RootMotionMode == ERootMotionMode::RootMotionFromMontagesOnly. This means code path for networked root motion is enabled.

◆ IsPlayingRootMotion()

bool ACharacter::IsPlayingRootMotion ( ) const

True if we are playing Anim root motion right now

◆ Jump()

void ACharacter::Jump ( )
virtual

Make the character jump on the next update.
If you want your character to jump according to the time that the jump key is held, then you can set JumpMaxHoldTime to some non-zero value. Make sure in this case to call StopJumping() when you want the jump's z-velocity to stop being applied (such as on a button up event), otherwise the character will carry on receiving the velocity until JumpKeyHoldTime reaches JumpMaxHoldTime.

◆ JumpIsAllowedInternal()

bool ACharacter::JumpIsAllowedInternal ( ) const
protected

◆ K2_OnEndCrouch()

ENGINE_API void ACharacter::K2_OnEndCrouch ( float  HalfHeightAdjust,
float  ScaledHalfHeightAdjust 
)

Event when Character stops crouching.

Parameters
HalfHeightAdjustdifference between default collision half-height, and actual crouched capsule half-height.
ScaledHalfHeightAdjustdifference after component scale is taken in to account.

◆ K2_OnMovementModeChanged()

ENGINE_API void ACharacter::K2_OnMovementModeChanged ( EMovementMode  PrevMovementMode,
EMovementMode  NewMovementMode,
uint8  PrevCustomMode,
uint8  NewCustomMode 
)

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

Parameters
PrevMovementModeMovement mode before the change
NewMovementModeNew movement mode
PrevCustomModeCustom mode before the change (applicable if PrevMovementMode is Custom)
NewCustomModeNew custom mode (applicable if NewMovementMode is Custom)

◆ K2_OnStartCrouch()

ENGINE_API void ACharacter::K2_OnStartCrouch ( float  HalfHeightAdjust,
float  ScaledHalfHeightAdjust 
)

Event when Character crouches.

Parameters
HalfHeightAdjustdifference between default collision half-height, and actual crouched capsule half-height.
ScaledHalfHeightAdjustdifference after component scale is taken in to account.

◆ K2_UpdateCustomMovement()

ENGINE_API void ACharacter::K2_UpdateCustomMovement ( float  DeltaTime)

Event for implementing custom character movement mode. Called by CharacterMovement if MovementMode is set to Custom.

Note
C++ code should override UCharacterMovementComponent::PhysCustom() instead.
See also
UCharacterMovementComponent::PhysCustom()

◆ Landed()

void ACharacter::Landed ( const FHitResult Hit)
virtual

Called upon landing when falling, to perform actions based on the Hit result. Triggers the OnLanded event. Note that movement mode is still "Falling" during this event. Current Velocity value is the velocity at the time of landing. Consider OnMovementModeChanged() as well, as that can be used once the movement mode changes to the new mode (most likely Walking).

Parameters
HitResult describing the landing that resulted in a valid landing spot.
See also
OnMovementModeChanged()

◆ LaunchCharacter()

void ACharacter::LaunchCharacter ( FVector  LaunchVelocity,
bool  bXYOverride,
bool  bZOverride 
)
virtual

Set a pending launch velocity on the Character. This velocity will be processed on the next CharacterMovementComponent tick, and will set it to the "falling" state. Triggers the OnLaunched event. @PARAM LaunchVelocity is the velocity to impart to the Character @PARAM bXYOverride if true replace the XY part of the Character's velocity instead of adding to it. @PARAM bZOverride if true replace the Z component of the Character's velocity instead of adding to it.

◆ MoveBlockedBy()

virtual void ACharacter::MoveBlockedBy ( const FHitResult Impact)
inlinevirtual

Called when pawn's movement is blocked

Parameters
Impactdescribes the blocking hit.

◆ NotifyActorBeginOverlap()

void ACharacter::NotifyActorBeginOverlap ( AActor OtherActor)
virtual

◆ NotifyActorEndOverlap()

void ACharacter::NotifyActorEndOverlap ( AActor OtherActor)
virtual

◆ NotifyJumpApex()

void ACharacter::NotifyJumpApex ( )
virtual

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

◆ OnEndCrouch()

void ACharacter::OnEndCrouch ( float  HalfHeightAdjust,
float  ScaledHalfHeightAdjust 
)
virtual

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

Parameters
HalfHeightAdjustdifference between default collision half-height, and actual crouched capsule half-height.
ScaledHalfHeightAdjustdifference after component scale is taken in to account.

◆ OnJumped()

ENGINE_API void ACharacter::OnJumped ( )

Event fired when the character has just started jumping

◆ OnJumped_Implementation()

void ACharacter::OnJumped_Implementation ( )
virtual

◆ OnLanded()

ENGINE_API void ACharacter::OnLanded ( const FHitResult Hit)

Called upon landing when falling, to perform actions based on the Hit result. Note that movement mode is still "Falling" during this event. Current Velocity value is the velocity at the time of landing. Consider OnMovementModeChanged() as well, as that can be used once the movement mode changes to the new mode (most likely Walking).

Parameters
HitResult describing the landing that resulted in a valid landing spot.
See also
OnMovementModeChanged()

◆ OnLaunched()

ENGINE_API void ACharacter::OnLaunched ( FVector  LaunchVelocity,
bool  bXYOverride,
bool  bZOverride 
)

Let blueprint know that we were launched

◆ OnMovementModeChanged()

void ACharacter::OnMovementModeChanged ( EMovementMode  PrevMovementMode,
uint8  PreviousCustomMode = 0 
)
virtual

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

Parameters
PrevMovementModeMovement mode before the change
PrevCustomModeCustom mode before the change (applicable if PrevMovementMode is Custom)

◆ OnRep_IsCrouched()

void ACharacter::OnRep_IsCrouched ( )
virtual

Handle Crouching replicated from server

◆ OnRep_ReplayLastTransformUpdateTimeStamp()

void ACharacter::OnRep_ReplayLastTransformUpdateTimeStamp ( )

◆ OnRep_ReplicatedBasedMovement()

void ACharacter::OnRep_ReplicatedBasedMovement ( )
virtual

Rep notify for ReplicatedBasedMovement

◆ OnRep_ReplicatedMovement()

void ACharacter::OnRep_ReplicatedMovement ( )
overridevirtual

◆ OnRep_RootMotion()

void ACharacter::OnRep_RootMotion ( )

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

◆ OnStartCrouch()

void ACharacter::OnStartCrouch ( float  HalfHeightAdjust,
float  ScaledHalfHeightAdjust 
)
virtual

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

Parameters
HalfHeightAdjustdifference between default collision half-height, and actual crouched capsule half-height.
ScaledHalfHeightAdjustdifference after component scale is taken in to account.

◆ OnUpdateSimulatedPosition()

void ACharacter::OnUpdateSimulatedPosition ( const FVector OldLocation,
const FQuat OldRotation 
)
virtual

Called on client after position update is received to respond to the new location and rotation. Actual change in location is expected to occur in CharacterMovement->SmoothCorrection(), after which this occurs. Default behavior is to check for penetration in a blocking object if bClientCheckEncroachmentOnNetUpdate is enabled, and set bSimGravityDisabled=true if so.

◆ OnWalkingOffLedge()

ENGINE_API void ACharacter::OnWalkingOffLedge ( const FVector PreviousFloorImpactNormal,
const FVector PreviousFloorContactNormal,
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. If CharacterMovement->MovementMode does not change during this event then the character will automatically start falling afterwards.

Note
Z velocity is zero during walking movement, and will be here as well. Another velocity can be computed here if desired and will be used when starting to fall.
Parameters
PreviousFloorImpactNormalNormal of the previous walkable floor.
PreviousFloorContactNormalNormal of the contact with the previous walkable floor.
PreviousLocationPrevious character location before movement off the ledge.
TimeTickTime delta of movement update resulting in moving off the ledge.

◆ OnWalkingOffLedge_Implementation()

void ACharacter::OnWalkingOffLedge_Implementation ( const FVector PreviousFloorImpactNormal,
const FVector PreviousFloorContactNormal,
const FVector PreviousLocation,
float  TimeDelta 
)
virtual

◆ PawnClientRestart()

void ACharacter::PawnClientRestart ( )
overridevirtual

◆ PlayAnimMontage()

float ACharacter::PlayAnimMontage ( class UAnimMontage AnimMontage,
float  InPlayRate = 1.f,
FName  StartSectionName = NAME_None 
)
virtual

Play Animation Montage on the character mesh. Returns the length of the animation montage in seconds, or 0.f if failed to play.

◆ PossessedBy()

void ACharacter::PossessedBy ( AController NewController)
overridevirtual

◆ PostInitializeComponents()

void ACharacter::PostInitializeComponents ( )
overridevirtual

◆ PostLoad()

void ACharacter::PostLoad ( )
overridevirtual

Reimplemented in AEQSTestingPawn.

◆ PostNetReceive()

void ACharacter::PostNetReceive ( )
overridevirtual

◆ PostNetReceiveLocationAndRotation()

void ACharacter::PostNetReceiveLocationAndRotation ( )
overridevirtual

◆ PreNetReceive()

void ACharacter::PreNetReceive ( )
overridevirtual

◆ PreReplication()

void ACharacter::PreReplication ( IRepChangedPropertyTracker ChangedPropertyTracker)
overridevirtual

Called on the actor right before replication occurs. Only called on Server, and for autonomous proxies if recording a Client Replay.

◆ PreReplicationForReplay()

void ACharacter::PreReplicationForReplay ( IRepChangedPropertyTracker ChangedPropertyTracker)
overridevirtual

Called on the actor right before replication occurs. Called for everyone when recording a Client Replay, including Simulated Proxies.

◆ RecalculateBaseEyeHeight()

void ACharacter::RecalculateBaseEyeHeight ( )
overridevirtual

◆ RecalculateCrouchedEyeHeight()

void ACharacter::RecalculateCrouchedEyeHeight ( )

Calculates the crouched eye height based on movement component settings

◆ ResetJumpState()

void ACharacter::ResetJumpState ( )
virtual

Marks character as not trying to jump

◆ Restart()

void ACharacter::Restart ( )
overridevirtual

◆ RestoreReplicatedMove()

bool ACharacter::RestoreReplicatedMove ( const FSimulatedRootMotionReplicatedMove RootMotionRepMove)

Restore actor to an old buffered move.

◆ RootMotionDebugClientPrintOnScreen()

ENGINE_API void ACharacter::RootMotionDebugClientPrintOnScreen ( const FString &  InString)

◆ RootMotionDebugClientPrintOnScreen_Implementation()

void ACharacter::RootMotionDebugClientPrintOnScreen_Implementation ( const FString &  InString)
virtual

◆ SaveRelativeBasedMovement()

void ACharacter::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.

◆ ServerMove()

ENGINE_API void ACharacter::ServerMove ( float  TimeStamp,
FVector_NetQuantize10  InAccel,
FVector_NetQuantize100  ClientLoc,
uint8  CompressedMoveFlags,
uint8  ClientRoll,
uint32  View,
UPrimitiveComponent *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

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

◆ ServerMove_Implementation()

void ACharacter::ServerMove_Implementation ( float  TimeStamp,
FVector_NetQuantize10  InAccel,
FVector_NetQuantize100  ClientLoc,
uint8  CompressedMoveFlags,
uint8  ClientRoll,
uint32  View,
UPrimitiveComponent *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

◆ ServerMove_Validate()

bool ACharacter::ServerMove_Validate ( float  TimeStamp,
FVector_NetQuantize10  InAccel,
FVector_NetQuantize100  ClientLoc,
uint8  CompressedMoveFlags,
uint8  ClientRoll,
uint32  View,
UPrimitiveComponent *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

◆ ServerMoveDual()

ENGINE_API void ACharacter::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 *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

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

◆ ServerMoveDual_Implementation()

void ACharacter::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 *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

◆ ServerMoveDual_Validate()

bool ACharacter::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 *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

◆ ServerMoveDualHybridRootMotion()

ENGINE_API void ACharacter::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 *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

Replicated function sent by client to server - contains client movement and view info for two moves. First move is non root motion, second is root motion.

◆ ServerMoveDualHybridRootMotion_Implementation()

void ACharacter::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 *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

◆ ServerMoveDualHybridRootMotion_Validate()

bool ACharacter::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 *  ClientMovementBase,
FName  ClientBaseBoneName,
uint8  ClientMovementMode 
)

◆ ServerMoveDualNoBase()

ENGINE_API void ACharacter::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.

◆ ServerMoveDualNoBase_Implementation()

void ACharacter::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 
)

◆ ServerMoveDualNoBase_Validate()

bool ACharacter::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 
)

◆ ServerMoveNoBase()

ENGINE_API void ACharacter::ServerMoveNoBase ( float  TimeStamp,
FVector_NetQuantize10  InAccel,
FVector_NetQuantize100  ClientLoc,
uint8  CompressedMoveFlags,
uint8  ClientRoll,
uint32  View,
uint8  ClientMovementMode 
)

Replicated function sent by client to server. Saves bandwidth over ServerMove() by implying that ClientMovementBase and ClientBaseBoneName are null. Passes through to CharacterMovement->ServerMove_Implementation() with null base params.

◆ ServerMoveNoBase_Implementation()

void ACharacter::ServerMoveNoBase_Implementation ( float  TimeStamp,
FVector_NetQuantize10  InAccel,
FVector_NetQuantize100  ClientLoc,
uint8  CompressedMoveFlags,
uint8  ClientRoll,
uint32  View,
uint8  ClientMovementMode 
)

◆ ServerMoveNoBase_Validate()

bool ACharacter::ServerMoveNoBase_Validate ( float  TimeStamp,
FVector_NetQuantize10  InAccel,
FVector_NetQuantize100  ClientLoc,
uint8  CompressedMoveFlags,
uint8  ClientRoll,
uint32  View,
uint8  ClientMovementMode 
)

◆ ServerMoveOld()

ENGINE_API void ACharacter::ServerMoveOld ( float  OldTimeStamp,
FVector_NetQuantize10  OldAccel,
uint8  OldMoveFlags 
)

◆ ServerMoveOld_Implementation()

void ACharacter::ServerMoveOld_Implementation ( float  OldTimeStamp,
FVector_NetQuantize10  OldAccel,
uint8  OldMoveFlags 
)

◆ ServerMoveOld_Validate()

bool ACharacter::ServerMoveOld_Validate ( float  OldTimeStamp,
FVector_NetQuantize10  OldAccel,
uint8  OldMoveFlags 
)

◆ ServerMovePacked()

ENGINE_API void ACharacter::ServerMovePacked ( const FCharacterServerMovePackedBits PackedBits)

◆ ServerMovePacked_Implementation()

void ACharacter::ServerMovePacked_Implementation ( const FCharacterServerMovePackedBits PackedBits)

◆ ServerMovePacked_Validate()

bool ACharacter::ServerMovePacked_Validate ( const FCharacterServerMovePackedBits PackedBits)

◆ SetAnimRootMotionTranslationScale()

void ACharacter::SetAnimRootMotionTranslationScale ( float  InAnimRootMotionTranslationScale = 1.f)

Sets scale to apply to root motion translation on this Character

◆ SetBase()

void ACharacter::SetBase ( UPrimitiveComponent *  NewBaseComponent,
const FName  InBoneName = NAME_None,
bool  bNotifyPawn = true 
)
virtual

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

Change the Pawn's base.

◆ SetIsCrouched()

void ACharacter::SetIsCrouched ( const bool  bInIsCrouched)

Specifies whether this Character is currently crouched or not. This function sets bIsCrouched and marks property as dirty.

◆ SetProxyIsJumpForceApplied()

void ACharacter::SetProxyIsJumpForceApplied ( const bool  bInProxyIsJumpForceApplied)

Set to indicate that this Character is currently under the force of a jump (if JumpMaxHoldTime is non-zero). IsJumpProvidingForce() handles this as well. This function sets bProxyIsJumpForceApplied

◆ SetReplayLastTransformUpdateTimeStamp()

void ACharacter::SetReplayLastTransformUpdateTimeStamp ( const float  InReplayLastTransformUpdateTimeStamp)
protected

This is updated every frame to the latest timestamp, but only replicated to Replays, this is because we want to save positions to the replay replication connection each frame to ensure smooth movement. Sets ReplayLastTransformUpdateTimeStamp.

◆ SetReplicatedBasedMovement()

void ACharacter::SetReplicatedBasedMovement ( const FBasedMovementInfo InReplicatedBasedMovement)
protected

This is the Replicated version of relative movement. Do not modify on simulated proxies! Sets ReplicatedBasedMovement

◆ SetReplicatedGravityDirection()

void ACharacter::SetReplicatedGravityDirection ( const FVector InReplicatedGravityDirection)
protected

CharacterMovement Custom gravity direction replicated for simulated proxies. This function sets ReplicatedGravityDirection and also marks property as dirty.

◆ SetReplicatedMovementMode()

void ACharacter::SetReplicatedMovementMode ( const uint8  InReplicatedMovementMode)
protected

Sets CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. Use CharacterMovementComponent::UnpackNetworkMovementMode() to translate it. This function sets the compressed value of ReplicatedMovementMode.

◆ SetReplicatedServerLastTransformUpdateTimeStamp()

void ACharacter::SetReplicatedServerLastTransformUpdateTimeStamp ( const float  InReplicatedServerLastTransformUpdateTimeStamp)
protected

This is the value of the CharacterMovement timestamp, and is replicated down to SimulatedProxies to assist with visual smoothing of the character. May not be updated every frame to reduce bandwidth. This function sets ReplicatedServerLastTransformUpdateTimeStamp.

◆ SetReplicateMovement()

void ACharacter::SetReplicateMovement ( bool  bInReplicateMovement)
overridevirtual

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

◆ SetRepRootMotion()

void ACharacter::SetRepRootMotion ( const FRepRootMotionMontage InRepRootMotion)

Replicated Root Motion montage. Sets RepRootMotion

◆ SetupPlayerInputComponent()

void ACharacter::SetupPlayerInputComponent ( class UInputComponent PlayerInputComponent)
overridevirtual

◆ ShouldNotifyLanded()

bool ACharacter::ShouldNotifyLanded ( const struct FHitResult Hit)
virtual

Returns true if the Landed() event should be called. Used by CharacterMovement to prevent notifications while playing back network moves.

Don't process landed notification if updating client position by replaying moves. Allow event to be called if Pawn was initially falling (before starting to replay moves), and this is going to cause it to land. .

◆ ShouldReplicateAcceleration()

virtual bool ACharacter::ShouldReplicateAcceleration ( ) const
inlineprotectedvirtual

Whether this Character should include acceleration data in its replicated movement

◆ SimulatedRootMotionPositionFixup()

void ACharacter::SimulatedRootMotionPositionFixup ( float  DeltaSeconds)

Position fix up for Simulated Proxies playing Root Motion

◆ StopAnimMontage()

void ACharacter::StopAnimMontage ( class UAnimMontage AnimMontage = nullptr)
virtual

Stop Animation Montage. If nullptr, it will stop what's currently active. The Blend Out Time is taken from the montage asset that is being stopped.

◆ StopJumping()

void ACharacter::StopJumping ( )
virtual

Stop the character from jumping on the next update. Call this from an input event (such as a button 'up' event) to cease applying jump Z-velocity. If this is not called, then jump z-velocity will be applied until JumpMaxHoldTime is reached.

◆ TornOff()

void ACharacter::TornOff ( )
overridevirtual

◆ TurnOff()

void ACharacter::TurnOff ( )
overridevirtual

◆ UnCrouch()

void ACharacter::UnCrouch ( bool  bClientSimulation = false)
virtual

Request the character to stop crouching. The request is processed on the next update of the CharacterMovementComponent.

See also
OnEndCrouch
IsCrouched
CharacterMovement->WantsToCrouch

◆ UnPossessed()

void ACharacter::UnPossessed ( )
overridevirtual

◆ UpdateNavigationRelevance()

void ACharacter::UpdateNavigationRelevance ( )
overridevirtual

Member Data Documentation

◆ AnimRootMotionTranslationScale

float ACharacter::AnimRootMotionTranslationScale
protected

Scale to apply to root motion translation on this Character

◆ BasedMovement

struct FBasedMovementInfo ACharacter::BasedMovement
protected

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

◆ BaseRotationOffset

FQuat ACharacter::BaseRotationOffset
protected

Saved rotation offset of mesh.

◆ BaseTranslationOffset

FVector ACharacter::BaseTranslationOffset
protected

Saved translation offset of mesh.

◆ bClientCheckEncroachmentOnNetUpdate

uint8 ACharacter::bClientCheckEncroachmentOnNetUpdate

◆ bClientResimulateRootMotion

uint8 ACharacter::bClientResimulateRootMotion

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

◆ bClientResimulateRootMotionSources

uint8 ACharacter::bClientResimulateRootMotionSources

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

◆ bClientUpdating

uint8 ACharacter::bClientUpdating

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

◆ bClientWasFalling

uint8 ACharacter::bClientWasFalling

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

◆ bInBaseReplication

uint8 ACharacter::bInBaseReplication
protected

Flag that we are receiving replication of the based movement.

◆ bIsCrouched

uint8 ACharacter::bIsCrouched

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

◆ bPressedJump

uint8 ACharacter::bPressedJump

When true, player wants to jump

◆ bProxyIsJumpForceApplied

uint8 ACharacter::bProxyIsJumpForceApplied

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

◆ bServerMoveIgnoreRootMotion

uint8 ACharacter::bServerMoveIgnoreRootMotion

Disable root motion on the server. When receiving a DualServerMove, where the first move is not root motion and the second is.

◆ bSimGravityDisabled

uint8 ACharacter::bSimGravityDisabled

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

◆ bWasJumping

uint8 ACharacter::bWasJumping

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

◆ CapsuleComponentName

FName ACharacter::CapsuleComponentName
static

Name of the CapsuleComponent.

◆ CharacterMovementComponentName

FName ACharacter::CharacterMovementComponentName
static

Name of the CharacterMovement component. Use this name if you want to use a different class (with ObjectInitializer.SetDefaultSubobjectClass).

◆ ClientRootMotionParams

FRootMotionMovementParams ACharacter::ClientRootMotionParams

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

◆ CrouchedEyeHeight

float ACharacter::CrouchedEyeHeight

Default crouched eye height

◆ JumpCurrentCount

int32 ACharacter::JumpCurrentCount

Tracks the current number of jumps performed. This is incremented in CheckJumpInput, used in CanJump_Implementation, and reset in OnMovementModeChanged. When providing overrides for these methods, it's recommended to either manually increment / reset this value, or call the Super:: method.

◆ JumpCurrentCountPreJump

int32 ACharacter::JumpCurrentCountPreJump

Represents the current number of jumps performed before CheckJumpInput modifies JumpCurrentCount. This is set in CheckJumpInput and is used in SetMoveFor and PrepMoveFor instead of JumpCurrentCount since CheckJumpInput can modify JumpCurrentCount. When providing overrides for these methods, it's recommended to either manually set this value, or call the Super:: method.

◆ JumpForceTimeRemaining

float ACharacter::JumpForceTimeRemaining

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

◆ JumpKeyHoldTime

float ACharacter::JumpKeyHoldTime

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

◆ JumpMaxCount

int32 ACharacter::JumpMaxCount

The max number of jumps the character can perform. Note that if JumpMaxHoldTime is non zero and StopJumping is not called, the player may be able to perform and unlimited number of jumps. Therefore it is usually best to call StopJumping() when jump input has ceased (such as a button up event).

◆ JumpMaxHoldTime

float ACharacter::JumpMaxHoldTime

The max time the jump key can be held. Note that if StopJumping() is not called before the max jump hold time is reached, then the character will carry on receiving vertical velocity. Therefore it is usually best to call StopJumping() when jump input has ceased (such as a button up event).

◆ LandedDelegate

FLandedSignature ACharacter::LandedDelegate

Called upon landing when falling, to perform actions based on the Hit result. Note that movement mode is still "Falling" during this event. Current Velocity value is the velocity at the time of landing. Consider OnMovementModeChanged() as well, as that can be used once the movement mode changes to the new mode (most likely Walking).

Parameters
HitResult describing the landing that resulted in a valid landing spot.
See also
OnMovementModeChanged()

◆ MeshComponentName

FName ACharacter::MeshComponentName
static

Name of the MeshComponent. Use this name if you want to prevent creation of the component (with ObjectInitializer.DoNotCreateDefaultSubobject).

◆ MovementModeChangedDelegate

FMovementModeChangedSignature ACharacter::MovementModeChangedDelegate

Multicast delegate for MovementMode changing.

◆ NumActorOverlapEventsCounter

uint32 ACharacter::NumActorOverlapEventsCounter

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

◆ OnCharacterMovementUpdated

FCharacterMovementUpdatedSignature ACharacter::OnCharacterMovementUpdated

Event triggered at the end of a CharacterMovementComponent movement update. This is the preferred event to use rather than the Tick event when performing custom updates to CharacterMovement properties based on the current state. This is mainly due to the nature of network updates, where client corrections in position from the server can cause multiple iterations of a movement update, which allows this event to update as well, while a Tick event would not.

Parameters
DeltaSecondsDelta time in seconds for this update
InitialLocationLocation at the start of the update. May be different than the current location if movement occurred.
InitialVelocityVelocity at the start of the update. May be different than the current velocity.

◆ OnReachedJumpApex

FCharacterReachedApexSignature ACharacter::OnReachedJumpApex

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

◆ PreNetReceivedGravityDirection

FVector_NetQuantizeNormal ACharacter::PreNetReceivedGravityDirection
protected

Cached version of the replicated gravity direction before replication. Used to compare if the value was changed as a result of replication.

◆ ProxyJumpForceStartedTime

float ACharacter::ProxyJumpForceStartedTime

Track last time a jump force started for a proxy.

◆ ReplayLastTransformUpdateTimeStamp

float ACharacter::ReplayLastTransformUpdateTimeStamp
protected

◆ ReplicatedBasedMovement

struct FBasedMovementInfo ACharacter::ReplicatedBasedMovement
protected

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

◆ ReplicatedGravityDirection

FVector_NetQuantizeNormal ACharacter::ReplicatedGravityDirection
protected

CharacterMovement Custom gravity direction replicated for simulated proxies.

◆ ReplicatedMovementMode

uint8 ACharacter::ReplicatedMovementMode
protected

CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. Use CharacterMovementComponent::UnpackNetworkMovementMode() to translate it.

◆ ReplicatedServerLastTransformUpdateTimeStamp

float ACharacter::ReplicatedServerLastTransformUpdateTimeStamp
protected

CharacterMovement ServerLastTransformUpdateTimeStamp value, replicated to simulated proxies.

◆ RepRootMotion

struct FRepRootMotionMontage ACharacter::RepRootMotion

Replicated Root Motion montage

◆ RootMotionRepMoves

TArray<FSimulatedRootMotionReplicatedMove> ACharacter::RootMotionRepMoves

Array of previously received root motion moves from the server.

◆ SavedRootMotion

FRootMotionSourceGroup ACharacter::SavedRootMotion

For LocallyControlled Autonomous clients. During a PerformMovement() after root motion is prepared, we save it off into this and then record it into our SavedMoves. During SavedMove playback we use it as our "Previous Move" SavedRootMotion which includes last received root motion from the Server


The documentation for this class was generated from the following files: