Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | ACharacter |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Character.h |
| Include Path | #include "GameFramework/Character.h" |
Syntax
UCLASS (Config=Game, BlueprintType,
Meta=(ShortTooltip="A character is a type of Pawn that includes the ability to walk around."),
MinimalAPI)
class ACharacter : public APawn
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → APawn → ACharacter
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ACharacter
(
const FObjectInitializer& ObjectInitializer |
Default UObject constructor. | GameFramework/Character.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CapsuleComponentName | FName | Name of the CapsuleComponent. | GameFramework/Character.h |
| CharacterMovementComponentName | FName | Name of the CharacterMovement component. | GameFramework/Character.h |
| MeshComponentName | FName | Name of the MeshComponent. | GameFramework/Character.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bBaseRelativePosition | FVectorUPrimitiveComponentFName bool bool | GameFramework/Character.h | ||
| bBaseRelativePosition | FRootMotionSourceGroup bool float FVectorFVector_NetQuantizeNormal float UPrimitiveComponentFName bool bool | GameFramework/Character.h | ||
| bBaseRelativePosition | float FVectorFVector_NetQuantizeNormal float UPrimitiveComponentFName bool bool | GameFramework/Character.h | ||
| bBaseRelativePosition | FVectorFVectorUPrimitiveComponentFName bool bool | GameFramework/Character.h | ||
| bClientCheckEncroachmentOnNetUpdate | uint8 | GameFramework/Character.h |
|
|
| bClientResimulateRootMotion | uint8 | If server disagrees with root motion track position, client has to resimulate root motion from last AckedMove. | GameFramework/Character.h |
|
| bClientResimulateRootMotionSources | uint8 | If server disagrees with root motion state, client has to resimulate root motion from last AckedMove. | GameFramework/Character.h |
|
| bClientUpdating | uint8 | When true, applying updates to network client (replaying saved moves for a locally controlled character) | GameFramework/Character.h |
|
| bClientWasFalling | uint8 | True if Pawn was initially falling when started to replay network moves. | GameFramework/Character.h |
|
| bHasAnimRootMotion | FRootMotionSourceGroup bool | GameFramework/Character.h | ||
| bHasBase | FRootMotionSourceGroup bool float FVectorFVector_NetQuantizeNormal float UPrimitiveComponentFName bool | GameFramework/Character.h | ||
| bHasBase | float FVectorFVector_NetQuantizeNormal float UPrimitiveComponentFName bool | GameFramework/Character.h | ||
| bHasBase | FVectorUPrimitiveComponentFName bool | GameFramework/Character.h | ||
| bHasBase | FVectorFVectorUPrimitiveComponentFName bool | GameFramework/Character.h | ||
| bIsCrouched | uint8 | Set by character movement to specify that this Character is currently crouched. | GameFramework/Character.h |
|
| bPressedJump | uint8 | When true, player wants to jump | GameFramework/Character.h |
|
| bProxyIsJumpForceApplied | uint8 | Set to indicate that this Character is currently under the force of a jump (if JumpMaxHoldTime is non-zero). | GameFramework/Character.h |
|
| bServerMoveIgnoreRootMotion | uint8 | Disable root motion on the server. | GameFramework/Character.h |
|
| bSimGravityDisabled | uint8 | Disable simulated gravity (set when character encroaches geometry on client, to keep it from falling through floors) | GameFramework/Character.h | |
| bWasJumping | uint8 | Tracks whether or not the character was already jumping last frame. | GameFramework/Character.h |
|
| ClientBaseBoneName | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32UPrimitiveComponentFName | GameFramework/Character.h | ||
| ClientBaseBoneName | FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32UPrimitiveComponentFName | GameFramework/Character.h | ||
| ClientLoc | FVector_NetQuantize10FVector_NetQuantize100 | GameFramework/Character.h | ||
| ClientLoc | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10FVector_NetQuantize100 | GameFramework/Character.h | ||
| ClientMovementBase | FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32UPrimitiveComponent * | GameFramework/Character.h | ||
| ClientMovementBase | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32UPrimitiveComponent * | GameFramework/Character.h | ||
| ClientMovementMode | FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32UPrimitiveComponentFNameuint8 | GameFramework/Character.h | ||
| ClientMovementMode | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32UPrimitiveComponentFNameuint8 | GameFramework/Character.h | ||
| ClientMovementMode | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32uint8 | GameFramework/Character.h | ||
| ClientMovementMode | FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32uint8 | GameFramework/Character.h | ||
| ClientRoll | FVector_NetQuantize10FVector_NetQuantize100uint8uint8 | GameFramework/Character.h | ||
| ClientRoll | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10FVector_NetQuantize100uint8uint8 | GameFramework/Character.h | ||
| ClientRootMotionParams | FRootMotionMovementParams | For LocallyControlled Autonomous clients. Saved root motion data to be used by SavedMoves. | GameFramework/Character.h |
|
| CompressedMoveFlags | FVector_NetQuantize10FVector_NetQuantize100uint8 | GameFramework/Character.h | ||
| CrouchedEyeHeight | float | Default crouched eye height | GameFramework/Character.h |
|
| InAccel | FVector_NetQuantize10 | GameFramework/Character.h | ||
| InAccel | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10 | GameFramework/Character.h | ||
| InAccel0 | FVector_NetQuantize10 | GameFramework/Character.h | ||
| JumpCurrentCount | int32 | Tracks the current number of jumps performed. | GameFramework/Character.h |
|
| JumpCurrentCountPreJump | int32 | Represents the current number of jumps performed before CheckJumpInput modifies JumpCurrentCount. | GameFramework/Character.h |
|
| JumpForceTimeRemaining | float | Amount of jump force time remaining, if JumpMaxHoldTime > 0. | GameFramework/Character.h |
|
| JumpKeyHoldTime | float | Jump key Held Time. This is the time that the player has held the jump key, in seconds. | GameFramework/Character.h |
|
| JumpMaxCount | int32 | The max number of jumps the character can perform. | GameFramework/Character.h |
|
| JumpMaxHoldTime | float | The max time the jump key can be held. | GameFramework/Character.h |
|
| LandedDelegate | FLandedSignature | Called upon landing when falling, to perform actions based on the Hit result. | GameFramework/Character.h |
|
| MovementModeChangedDelegate | FMovementModeChangedSignature | Multicast delegate for MovementMode changing. | GameFramework/Character.h |
|
| NewBase | FVectorFVectorUPrimitiveComponent * | GameFramework/Character.h | ||
| NewBase | FVectorUPrimitiveComponent * | GameFramework/Character.h | ||
| NewBaseBoneName | FVectorFVectorUPrimitiveComponentFName | GameFramework/Character.h | ||
| NewBaseBoneName | FVectorUPrimitiveComponentFName | GameFramework/Character.h | ||
| NewFlags | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10FVector_NetQuantize100uint8 | GameFramework/Character.h | ||
| NewLoc | FVector | GameFramework/Character.h | ||
| NewVel | FVectorFVector | GameFramework/Character.h | ||
| NumActorOverlapEventsCounter | uint32 | Incremented every time there is an Actor overlap event (start or stop) on this actor. | GameFramework/Character.h | |
| OldAccel | FVector_NetQuantize10 | GameFramework/Character.h | ||
| OldMoveFlags | FVector_NetQuantize10uint8 | GameFramework/Character.h | ||
| OnCharacterMovementUpdated | FCharacterMovementUpdatedSignature | Event triggered at the end of a CharacterMovementComponent movement update. | GameFramework/Character.h |
|
| OnReachedJumpApex | FCharacterReachedApexSignature | Broadcast when Character's jump reaches its apex. Needs CharacterMovement->bNotifyApex = true | GameFramework/Character.h |
|
| PendingFlags | FVector_NetQuantize10uint8 | GameFramework/Character.h | ||
| ProxyJumpForceStartedTime | float | Track last time a jump force started for a proxy. | GameFramework/Character.h |
|
| RepRootMotion | FRepRootMotionMontage | Replicated Root Motion montage | GameFramework/Character.h |
|
| RootMotionRepMoves | TArray< FSimulatedRootMotionReplicatedMove > | Array of previously received root motion moves from the server. | GameFramework/Character.h |
|
| SavedRootMotion | FRootMotionSourceGroup | For LocallyControlled Autonomous clients. | GameFramework/Character.h |
|
| ServerBase | FRootMotionSourceGroup bool float FVectorFVector_NetQuantizeNormal float UPrimitiveComponent * | GameFramework/Character.h | ||
| ServerBase | float FVectorFVector_NetQuantizeNormal float UPrimitiveComponent * | GameFramework/Character.h | ||
| ServerBoneName | FRootMotionSourceGroup bool float FVectorFVector_NetQuantizeNormal float UPrimitiveComponentFName | GameFramework/Character.h | ||
| ServerBoneName | float FVectorFVector_NetQuantizeNormal float UPrimitiveComponentFName | GameFramework/Character.h | ||
| ServerLoc | FRootMotionSourceGroup bool float FVector | GameFramework/Character.h | ||
| ServerLoc | float FVector | GameFramework/Character.h | ||
| ServerMontageTrackPosition | FRootMotionSourceGroup bool float | GameFramework/Character.h | ||
| ServerMontageTrackPosition | float | GameFramework/Character.h | ||
| ServerMovementMode | FVectorUPrimitiveComponentFName bool bool uint8 | GameFramework/Character.h | ||
| ServerMovementMode | FVectorFVectorUPrimitiveComponentFName bool bool uint8 | GameFramework/Character.h | ||
| ServerMovementMode | FRootMotionSourceGroup bool float FVectorFVector_NetQuantizeNormal float UPrimitiveComponentFName bool bool uint8 | GameFramework/Character.h | ||
| ServerMovementMode | float FVectorFVector_NetQuantizeNormal float UPrimitiveComponentFName bool bool uint8 | GameFramework/Character.h | ||
| ServerRootMotion | FRootMotionSourceGroup | GameFramework/Character.h | ||
| ServerRotation | float FVectorFVector_NetQuantizeNormal | GameFramework/Character.h | ||
| ServerRotation | FRootMotionSourceGroup bool float FVectorFVector_NetQuantizeNormal | GameFramework/Character.h | ||
| ServerVelZ | float FVectorFVector_NetQuantizeNormal float | GameFramework/Character.h | ||
| ServerVelZ | FRootMotionSourceGroup bool float FVectorFVector_NetQuantizeNormal float | GameFramework/Character.h | ||
| TimeStamp | FVector_NetQuantize10uint8uint32 float | GameFramework/Character.h | ||
| View | FVector_NetQuantize10uint8uint32 float FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32 | GameFramework/Character.h | ||
| View | FVector_NetQuantize10FVector_NetQuantize100uint8uint8uint32 | GameFramework/Character.h | ||
| View0 | FVector_NetQuantize10uint8uint32 | GameFramework/Character.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ArrowComponent | TObjectPtr< UArrowComponent > | Component shown in the editor only to indicate character facing | GameFramework/Character.h | |
| CapsuleComponent | TObjectPtr< UCapsuleComponent > | The CapsuleComponent being used for movement collision (by CharacterMovement). | GameFramework/Character.h |
|
| CharacterMovement | TObjectPtr< UCharacterMovementComponent > | Movement component used for movement logic in various movement modes (walking, falling, etc), containing relevant settings and functions to control movement. | GameFramework/Character.h |
|
| Mesh | TObjectPtr< USkeletalMeshComponent > | The main skeletal mesh associated with this Character (optional sub-object). | GameFramework/Character.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyAsyncOutput
(
const FCharacterAsyncOutput& Output |
GameFramework/Character.h | ||
virtual void ApplyDamageMomentum
(
float DamageTaken, |
Apply momentum caused by damage. | GameFramework/Character.h | |
virtual void CacheInitialMeshOffset
(
FVector MeshRelativeLocation, |
Cache mesh offset from capsule. | GameFramework/Character.h |
|
virtual bool CanCrouch() |
GameFramework/Character.h |
|
|
bool CanJump () |
Check if the character can jump in the current state. | GameFramework/Character.h |
|
bool CanUseRootMotionRepMove
(
const FSimulatedRootMotionReplicatedMove& RootMotionRepMove, |
True if buffered move is usable to teleport client back to. | GameFramework/Character.h | |
virtual void CheckJumpInput
(
float DeltaTime |
Trigger jump if jump button has been pressed. | GameFramework/Character.h | |
virtual void ClearJumpInput
(
float DeltaTime |
Update jump input state after having checked input. | GameFramework/Character.h | |
void ClientCheatFly() |
GameFramework/Character.h |
|
|
virtual void ClientCheatFly_Implementation() |
GameFramework/Character.h |
|
|
void ClientCheatGhost() |
GameFramework/Character.h |
|
|
virtual void ClientCheatGhost_Implementation() |
GameFramework/Character.h |
|
|
void ClientCheatWalk() |
GameFramework/Character.h |
|
|
virtual void ClientCheatWalk_Implementation() |
GameFramework/Character.h |
|
|
void ClientMoveResponsePacked
(
const FCharacterMoveResponsePackedBits& PackedBits |
Client RPC that passes through to CharacterMovement (avoids RPC overhead for components). | GameFramework/Character.h |
|
void ClientMoveResponsePacked_Implementation
(
const FCharacterMoveResponsePackedBits& PackedBits |
GameFramework/Character.h |
|
|
bool ClientMoveResponsePacked_Validate
(
const FCharacterMoveResponsePackedBits& PackedBits |
GameFramework/Character.h | ||
virtual void Crouch
(
bool bClientSimulation |
Request the character to start crouching. | GameFramework/Character.h |
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientAdjustRootMotionPosition_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientAdjustRootMotionPosition, |
Replicate position correction to client when using root motion for movement. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientVeryShortAdjustPosition_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientVeryShortAdjustPosition, |
Bandwidth saving version, when velocity is zeroed | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientAdjustPosition_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientAdjustPosition, |
Replicate position correction to client, associated with a timestamped servermove. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientAckGoodMove, |
If no client adjustment is needed after processing received ServerMove(), ack the good move so client can remove it from SavedMoves | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientAdjustRootMotionSourcePosition, |
Replicate root motion source correction to client when using root motion for movement. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveOld_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveOld, |
Resending an (important) old move. Process it if not already processed. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveDualHybridRootMotion_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveDualHybridRootMotion, |
Replicated function sent by client to server - contains client movement and view info for two moves. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientAckGoodMove_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ClientAdjustRootMotionSourcePosition_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveDualNoBase, |
Replicated function sent by client to server - contains client movement and view info for two moves. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveDual_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveDual, |
Replicated function sent by client to server - contains client movement and view info for two moves. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveNoBase_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveNoBase, |
Replicated function sent by client to server. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMove_Implementation, |
GameFramework/Character.h |
|
|
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMove, |
BEGIN DEPRECATED RPCs that don't use variable sized payloads. Use ServerMovePacked and ClientMoveResponsePacked instead. | GameFramework/Character.h | |
DEPRECATED_CHARACTER_MOVEMENT_RPC
(
ServerMoveDualNoBase_Implementation, |
GameFramework/Character.h |
|
|
virtual void Falling() |
Called when the character's movement enters falling | GameFramework/Character.h | |
void FillAsyncInput
(
FCharacterAsyncInput& Input |
Async simulation API | GameFramework/Character.h | |
T * FindComponentByClass () |
GameFramework/Character.h | ||
int32 FindRootMotionRepMove
(
const FAnimMontageInstance& ClientMontageInstance |
Find usable root motion replicated move from our buffer. | GameFramework/Character.h | |
float GetAnimRootMotionTranslationScale () |
Scale to apply to root motion translation on this Character. | GameFramework/Character.h |
|
UArrowComponent * GetArrowComponent() |
Returns ArrowComponent subobject | GameFramework/Character.h | |
const FBasedMovementInfo & GetBasedMovement() |
Accessor for BasedMovement | GameFramework/Character.h | |
virtual FQuat GetBaseRotationOffset () |
Get the saved rotation offset of mesh. | GameFramework/Character.h | |
FRotator GetBaseRotationOffsetRotator () |
Get the saved rotation offset of mesh. | GameFramework/Character.h |
|
FVector GetBaseTranslationOffset () |
Get the saved translation offset of mesh. | GameFramework/Character.h |
|
UCapsuleComponent * GetCapsuleComponent() |
Returns CapsuleComponent subobject | GameFramework/Character.h | |
T * GetCharacterMovement () |
Returns CharacterMovement subobject | GameFramework/Character.h | |
| GameFramework/Character.h | |||
UAnimMontage * GetCurrentMontage() |
Return current playing Montage | GameFramework/Character.h |
|
virtual float GetJumpMaxHoldTime () |
Get the maximum jump time for the character. | GameFramework/Character.h | |
| END DEPRECATED RPCs. | GameFramework/Character.h | ||
bool GetProxyIsJumpForceApplied () |
Indicates that this Character is currently under the force of a jump (if JumpMaxHoldTime is non-zero). | GameFramework/Character.h | |
| 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. | GameFramework/Character.h | ||
const FBasedMovementInfo & GetReplicatedBasedMovement() |
Accessor for ReplicatedBasedMovement | GameFramework/Character.h | |
virtual FVector GetReplicatedGravityDirection() |
Returns replicated gravity direction for simulated proxies | GameFramework/Character.h | |
uint8 GetReplicatedMovementMode () |
CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. | GameFramework/Character.h | |
| This is the value of the CharacterMovement timestamp, and is replicated down to SimulatedProxies to assist with visual smoothing of the character. | GameFramework/Character.h | ||
const FRepRootMotionMontage & GetRepRootMotion() |
Replicated Root Motion montage. Returns RepRootMotion | GameFramework/Character.h | |
FRepRootMotionMontage & GetRepRootMotion_Mutable() |
Replicated Root Motion montage. Returns non-const RepRootMotion | GameFramework/Character.h | |
FAnimMontageInstance * GetRootMotionAnimMontageInstance() |
Get FAnimMontageInstance playing RootMotion | GameFramework/Character.h | |
bool HasAnyRootMotion() |
True if we are playing root motion from any source right now (anim root motion, root motion source) | GameFramework/Character.h |
|
void InitializeAsyncOutput
(
FCharacterAsyncOutput& Output |
GameFramework/Character.h | ||
bool IsCrouched () |
Set by character movement to specify that this Character is currently crouched. | GameFramework/Character.h | |
virtual 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. | GameFramework/Character.h |
|
| True if we are playing Root Motion right now, through a Montage with RootMotionMode == ERootMotionMode::RootMotionFromMontagesOnly. | GameFramework/Character.h |
|
|
bool IsPlayingRootMotion() |
True if we are playing Anim root motion right now | GameFramework/Character.h |
|
virtual void Jump () |
Make the character jump on the next update. | GameFramework/Character.h |
|
void K2_OnEndCrouch
(
float HalfHeightAdjust, |
Event when Character stops crouching. | GameFramework/Character.h |
|
void K2_OnMovementModeChanged
(
EMovementMode PrevMovementMode, |
Called from CharacterMovementComponent to notify the character that the movement mode has changed. | GameFramework/Character.h |
|
void K2_OnStartCrouch
(
float HalfHeightAdjust, |
Event when Character crouches. | GameFramework/Character.h |
|
void K2_UpdateCustomMovement
(
float DeltaTime |
Event for implementing custom character movement mode. | GameFramework/Character.h |
|
virtual void Landed
(
const FHitResult& Hit |
Called upon landing when falling, to perform actions based on the Hit result. | GameFramework/Character.h | |
virtual void LaunchCharacter
(
FVector LaunchVelocity, |
Set a pending launch velocity on the Character. | GameFramework/Character.h |
|
virtual void MoveBlockedBy
(
const FHitResult& Impact |
Called when pawn's movement is blocked | GameFramework/Character.h | |
virtual void NotifyJumpApex() |
Called when character's jump reaches Apex. Needs CharacterMovement->bNotifyApex = true | GameFramework/Character.h | |
virtual void OnEndCrouch
(
float HalfHeightAdjust, |
Called when Character stops crouching. | GameFramework/Character.h | |
void OnJumped() |
Event fired when the character has just started jumping | GameFramework/Character.h |
|
virtual void OnJumped_Implementation() |
GameFramework/Character.h |
|
|
void OnLanded
(
const FHitResult& Hit |
Called upon landing when falling, to perform actions based on the Hit result. | GameFramework/Character.h |
|
void OnLaunched
(
FVector LaunchVelocity, |
Let blueprint know that we were launched | GameFramework/Character.h |
|
virtual void OnMovementModeChanged
(
EMovementMode PrevMovementMode, |
Called from CharacterMovementComponent to notify the character that the movement mode has changed. | GameFramework/Character.h | |
virtual void OnRep_IsCrouched() |
Handle Crouching replicated from server | GameFramework/Character.h | |
void OnRep_ReplayLastTransformUpdateTimeStamp() |
GameFramework/Character.h | ||
virtual void OnRep_ReplicatedBasedMovement() |
Rep notify for ReplicatedBasedMovement | GameFramework/Character.h | |
void OnRep_RootMotion() |
Handles replicated root motion properties on simulated proxies and position correction. | GameFramework/Character.h | |
virtual void OnStartCrouch
(
float HalfHeightAdjust, |
Called when Character crouches. Called on non-owned Characters through bIsCrouched replication. | GameFramework/Character.h | |
virtual void OnUpdateSimulatedPosition
(
const FVector& OldLocation, |
Called on client after position update is received to respond to the new location and rotation. | GameFramework/Character.h | |
void OnWalkingOffLedge
(
const FVector& PreviousFloorImpactNormal, |
Event fired when the Character is walking off a surface and is about to fall because CharacterMovement->CurrentFloor became unwalkable. | GameFramework/Character.h |
|
virtual void OnWalkingOffLedge_Implementation
(
const FVector& PreviousFloorImpactNormal, |
GameFramework/Character.h |
|
|
virtual float PlayAnimMontage
(
UAnimMontage* AnimMontage, |
Play Animation Montage on the character mesh. | GameFramework/Character.h |
|
void RecalculateCrouchedEyeHeight() |
Calculates the crouched eye height based on movement component settings | GameFramework/Character.h | |
virtual void ResetJumpState() |
Marks character as not trying to jump | GameFramework/Character.h | |
bool RestoreReplicatedMove
(
const FSimulatedRootMotionReplicatedMove& RootMotionRepMove |
Restore actor to an old buffered move. | GameFramework/Character.h | |
void RootMotionDebugClientPrintOnScreen
(
const FString& InString |
GameFramework/Character.h |
|
|
virtual void RootMotionDebugClientPrintOnScreen_Implementation
(
const FString& InString |
GameFramework/Character.h |
|
|
void SaveRelativeBasedMovement
(
const FVector& NewRelativeLocation, |
Save a new relative location in BasedMovement and a new rotation with is either relative or absolute. | GameFramework/Character.h | |
bool ServerMove_Validate
(
float TimeStamp, |
GameFramework/Character.h | ||
bool ServerMoveDual_Validate
(
float TimeStamp0, |
GameFramework/Character.h | ||
bool ServerMoveDualHybridRootMotion_Validate
(
float TimeStamp0, |
GameFramework/Character.h | ||
bool ServerMoveDualNoBase_Validate
(
float TimeStamp0, |
GameFramework/Character.h | ||
bool ServerMoveNoBase_Validate
(
float TimeStamp, |
GameFramework/Character.h | ||
bool ServerMoveOld_Validate
(
float OldTimeStamp, |
GameFramework/Character.h | ||
void ServerMovePacked
(
const FCharacterServerMovePackedBits& PackedBits |
Server RPC that passes through to CharacterMovement (avoids RPC overhead for components). | GameFramework/Character.h |
|
void ServerMovePacked_Implementation
(
const FCharacterServerMovePackedBits& PackedBits |
GameFramework/Character.h |
|
|
bool ServerMovePacked_Validate
(
const FCharacterServerMovePackedBits& PackedBits |
GameFramework/Character.h | ||
void SetAnimRootMotionTranslationScale
(
float InAnimRootMotionTranslationScale |
Sets scale to apply to root motion translation on this Character | GameFramework/Character.h | |
virtual void SetBase
(
UPrimitiveComponent* NewBase, |
Sets the component the Character is walking on, used by CharacterMovement walking movement to be able to follow dynamic objects. | GameFramework/Character.h | |
void SetIsCrouched
(
const bool bInIsCrouched |
Specifies whether this Character is currently crouched or not. | GameFramework/Character.h | |
void SetProxyIsJumpForceApplied
(
const bool bInProxyIsJumpForceApplied |
Set to indicate that this Character is currently under the force of a jump (if JumpMaxHoldTime is non-zero). | GameFramework/Character.h | |
void SetRepRootMotion
(
const FRepRootMotionMontage& InRepRootMotion |
Replicated Root Motion montage. Sets RepRootMotion | GameFramework/Character.h | |
virtual bool ShouldNotifyLanded
(
const FHitResult& Hit |
Returns true if the Landed() event should be called. | GameFramework/Character.h | |
void SimulatedRootMotionPositionFixup
(
float DeltaSeconds |
Position fix up for Simulated Proxies playing Root Motion | GameFramework/Character.h | |
virtual void StopAnimMontage
(
UAnimMontage* AnimMontage |
Stop Animation Montage. | GameFramework/Character.h |
|
virtual void StopJumping () |
Stop the character from jumping on the next update. | GameFramework/Character.h |
|
virtual void UnCrouch
(
bool bClientSimulation |
Request the character to stop crouching. | GameFramework/Character.h |
|
Overridden from APawn
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DisplayDebug
(
UCanvas* Canvas, |
GameFramework/Character.h | ||
virtual float GetDefaultHalfHeight () |
Returns The half-height of the default Pawn, scaled by the component scale. | GameFramework/Character.h | |
virtual FVector GetGravityDirection() |
Returns vector direction of gravity | GameFramework/Character.h | |
virtual FQuat GetGravityTransform() |
Returns a quaternion transforming from world space into gravity relative space | GameFramework/Character.h | |
virtual UPrimitiveComponent * GetMovementBase() |
Return PrimitiveComponent we are based on (standing on, attached to, and moving on). | GameFramework/Character.h | |
virtual UPawnMovementComponent * GetMovementComponent () |
Return our PawnMovementComponent, if we have one. | GameFramework/Character.h | |
virtual void PawnClientRestart() |
Called on the owning client of a player-controlled Pawn when it is restarted, this calls Restart() | GameFramework/Character.h | |
virtual void PossessedBy
(
AController* NewController |
Called when this Pawn is possessed. Only called on the server (or in standalone). | GameFramework/Character.h | |
virtual void RecalculateBaseEyeHeight() |
Set BaseEyeHeight based on current state. | GameFramework/Character.h | |
virtual void Restart () |
Called when the Pawn is being restarted (usually by being possessed by a Controller). | GameFramework/Character.h | |
virtual void SetupPlayerInputComponent
(
UInputComponent* PlayerInputComponent |
Allows a Pawn to set up custom input bindings. | GameFramework/Character.h | |
virtual void TurnOff() |
Freeze pawn - stop sounds, animations, physics, weapon firing | GameFramework/Character.h | |
virtual void UnPossessed() |
Called when our Controller no longer possesses us. Only called on the server (or in standalone). | GameFramework/Character.h | |
virtual void UpdateNavigationRelevance() |
Update all components relevant for navigation generators to match bCanAffectNavigationGeneration flag | GameFramework/Character.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlay() |
Overridable native event for when play begins for this actor. | GameFramework/Character.h | |
virtual void ClearCrossLevelReferences() |
Do anything needed to clear out cross level references; Called from ULevel::PreSave | GameFramework/Character.h | |
virtual UActorComponent * FindComponentByClass
(
const TSubclassOf< UActorComponent > ComponentClass |
Searches components array and returns first encountered component of the specified class, native version of GetComponentByClass | GameFramework/Character.h | |
virtual void GatherCurrentMovement() |
Fills ReplicatedMovement property | GameFramework/Character.h | |
virtual void GetSimpleCollisionCylinder
(
float& CollisionRadius, |
Get axis-aligned cylinder around this actor, used for simple collision checks (ie Pawns reaching a destination). | GameFramework/Character.h | |
virtual void NotifyActorBeginOverlap
(
AActor* OtherActor |
Event when this actor overlaps another actor, for example a player walking into a trigger. | GameFramework/Character.h | |
virtual void NotifyActorEndOverlap
(
AActor* OtherActor |
Event when an actor no longer overlaps another actor, and they have separated. | GameFramework/Character.h | |
virtual void OnRep_ReplicatedMovement() |
ReplicatedMovement struct replication event | GameFramework/Character.h | |
virtual void PostInitializeComponents() |
Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay | GameFramework/Character.h | |
virtual void PostNetReceiveLocationAndRotation() |
Update location and rotation from ReplicatedMovement. Not called for simulated physics! | GameFramework/Character.h | |
virtual void PreReplication
(
IRepChangedPropertyTracker& ChangedPropertyTracker |
Called on the actor right before replication occurs. | GameFramework/Character.h | |
virtual void PreReplicationForReplay
(
IRepChangedPropertyTracker& ChangedPropertyTracker |
Called on the actor right before replication occurs. | GameFramework/Character.h | |
virtual void SetReplicateMovement
(
bool bInReplicateMovement |
Set whether this actor's movement replicates to network clients. | GameFramework/Character.h | |
virtual void TornOff () |
Networking - called on client when actor is torn off (bTearOff==true), meaning it's no longer replicated to clients. | GameFramework/Character.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GetLifetimeReplicatedProps
(
TArray< FLifetimeProperty >& OutLifetimeProps |
Returns the properties used for network replication, this needs to be overridden by all actor classes with native replicated properties | GameFramework/Character.h | |
virtual void GetReplicatedCustomConditionState
(
FCustomPropertyConditionState& OutActiveState |
Called when this actor begins replicating to initialize the state of custom property conditions | GameFramework/Character.h | |
virtual void PostLoad() |
GameFramework/Character.h | ||
virtual void PostNetReceive() |
Always called immediately after properties are received from the remote. | GameFramework/Character.h | |
virtual void PreNetReceive() |
Always called immediately before properties are received from the remote. | GameFramework/Character.h |
Overridden from INavAgentInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector GetNavAgentLocation() |
Basically retrieved pawn's location on navmesh | GameFramework/Character.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BaseChange() |
Event called after actor's base changes (if SetBase was requested to notify us with bNotifyPawn). | GameFramework/Character.h | |
bool CanJumpInternal () |
Customizable event to check if the character can jump in the current state. | GameFramework/Character.h |
|
virtual bool CanJumpInternal_Implementation() |
GameFramework/Character.h |
|
|
| This is the Replicated version of relative movement. | GameFramework/Character.h | ||
bool JumpIsAllowedInternal() |
GameFramework/Character.h | ||
void SetReplayLastTransformUpdateTimeStamp
(
const float InReplayLastTransformUpdateTimeStamp |
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. | GameFramework/Character.h | |
void SetReplicatedBasedMovement
(
const FBasedMovementInfo& InReplicatedBasedMovement |
This is the Replicated version of relative movement. | GameFramework/Character.h | |
void SetReplicatedGravityDirection
(
const FVector& InReplicatedGravityDirection |
CharacterMovement Custom gravity direction replicated for simulated proxies. | GameFramework/Character.h | |
void SetReplicatedMovementMode
(
const uint8 InReplicatedMovementMode |
Sets CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. | GameFramework/Character.h | |
void SetReplicatedServerLastTransformUpdateTimeStamp
(
const float InReplicatedServerLastTransformUpdateTimeStamp |
This is the value of the CharacterMovement timestamp, and is replicated down to SimulatedProxies to assist with visual smoothing of the character. | GameFramework/Character.h | |
virtual bool ShouldReplicateAcceleration() |
Whether this Character should include acceleration data in its replicated movement | GameFramework/Character.h |