Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/GameFramework/Character.h |
Include |
#include "GameFramework/Character.h" |
class ACharacter : public APawn
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 | Description | ||
---|---|---|---|
|
float |
AnimRootMotionTranslationScale |
Scale to apply to root motion translation on this Character |
|
BasedMovement |
Info about our current movement base (object we are standing on). |
|
|
BaseRotationOffset |
Saved rotation offset of mesh. |
|
|
BaseTranslationOffset |
Saved translation offset of mesh. |
|
|
uint32: 1 |
bClientCheckEncroachmentOnNetUpdate |
|
|
uint32: 1 |
bClientResimulateRootMotion |
If server disagrees with root motion track position, client has to resimulate root motion from last AckedMove. |
|
uint32: 1 |
bClientResimulateRootMotionSources |
If server disagrees with root motion state, client has to resimulate root motion from last AckedMove. |
|
uint32: 1 |
bClientUpdating |
When true, applying updates to network client (replaying saved moves for a locally controlled character) |
|
uint32: 1 |
bClientWasFalling |
True if Pawn was initially falling when started to replay network moves. |
|
bInBaseReplication |
Flag that we are receiving replication of the based movement. |
|
|
uint32: 1 |
bIsCrouched |
Set by character movement to specify that this Character is currently crouched. |
|
uint32: 1 |
bPressedJump |
When true, player wants to jump |
|
uint32: 1 |
bProxyIsJumpForceApplied |
Set to indicate that this Character is currently under the force of a jump (if JumpMaxHoldTime is non-zero). |
|
uint32: 1 |
bServerMoveIgnoreRootMotion |
Disable root motion on the server. |
|
uint32: 1 |
bSimGravityDisabled |
Disable simulated gravity (set when character encroaches geometry on client, to keep him from falling through floors) |
|
uint32: 1 |
bWasJumping |
Tracks whether or not the character was already jumping last frame. |
|
ClientRootMotionParams |
For LocallyControlled Autonomous clients. Saved root motion data to be used by SavedMoves. |
|
|
float |
CrouchedEyeHeight |
Default crouched eye height |
|
JumpCurrentCount |
Tracks the current number of jumps performed. |
|
|
JumpCurrentCountPreJump |
Represents the current number of jumps performed before CheckJumpInput modifies JumpCurrentCount. |
|
|
float |
JumpForceTimeRemaining |
Amount of jump force time remaining, if JumpMaxHoldTime > 0. |
|
float |
JumpKeyHoldTime |
Jump key Held Time. This is the time that the player has held the jump key, in seconds. |
|
JumpMaxCount |
The max number of jumps the character can perform. |
|
|
float |
JumpMaxHoldTime |
The max time the jump key can be held. |
|
LandedDelegate |
Called upon landing when falling, to perform actions based on the Hit result. |
|
|
MovementModeChangedDelegate |
Multicast delegate for MovementMode changing. |
|
|
NumActorOverlapEventsCounter |
Incremented every time there is an Actor overlap event (start or stop) on this actor. |
|
|
OnCharacterMovementUpdated |
Event triggered at the end of a CharacterMovementComponent movement update. |
|
|
OnReachedJumpApex |
Broadcast when Character's jump reaches its apex. Needs CharacterMovement->bNotifyApex = true |
|
|
float |
ProxyJumpForceStartedTime |
Track last time a jump force started for a proxy. |
|
float |
ReplayLastTransformUpdateTimeStamp |
|
|
ReplicatedBasedMovement |
Replicated version of relative movement. Read-only on simulated proxies! |
|
|
ReplicatedMovementMode |
CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. |
|
|
float |
ReplicatedServerLastTransformUpdateTimeStamp |
CharacterMovement ServerLastTransformUpdateTimeStamp value, replicated to simulated proxies. |
|
RepRootMotion |
Replicated Root Motion montage |
|
|
RootMotionRepMoves |
Array of previously received root motion moves from the server. |
|
|
SavedRootMotion |
For LocallyControlled Autonomous clients. |
Name | Description | |
---|---|---|
|
ACharacter ( |
Default UObject constructor. |
Name | Description | ||
---|---|---|---|
|
ApplyAsyncOutput ( |
||
|
ApplyDamageMomentum ( |
Apply momentum caused by damage. |
|
|
BaseChange() |
Event called after actor's base changes (if SetBase was requested to notify us with bNotifyPawn). |
|
|
CacheInitialMeshOffset |
Cache mesh offset from capsule. |
|
|
CanCrouch() |
||
|
CanJump() |
Check if the character can jump in the current state. |
|
|
CanJumpInternal() |
Customizable event to check if the character can jump in the current state. |
|
|
CanJumpInternal_Implementation() |
Customizable event to check if the character can jump in the current state. |
|
|
CanUseRootMotionRepMove ( |
True if buffered move is usable to teleport client back to. |
|
|
CheckJumpInput ( |
Trigger jump if jump button has been pressed. |
|
|
ClearJumpInput ( |
Update jump input state after having checked input. |
|
|
ClientAckGoodMove ( |
If no client adjustment is needed after processing received ServerMove(), ack the good move so client can remove it from SavedMoves |
|
|
ClientAckGoodMove_Implementation ( |
If no client adjustment is needed after processing received ServerMove(), ack the good move so client can remove it from SavedMoves |
|
|
ClientAdjustPosition |
Replicate position correction to client, associated with a timestamped servermove. |
|
|
ClientAdjustPosition_Implementation |
Replicate position correction to client, associated with a timestamped servermove. |
|
|
ClientAdjustRootMotionPosition ( |
Replicate position correction to client when using root motion for movement. |
|
|
ClientAdjustRootMotionPosition_Implementation ( |
Replicate position correction to client when using root motion for movement. |
|
|
ClientAdjustRootMotionSourcePosition ( |
Replicate root motion source correction to client when using root motion for movement. |
|
|
ClientAdjustRootMotionSourcePosition_Implementation ( |
Replicate root motion source correction to client when using root motion for movement. |
|
|
ClientCheatFly() |
||
|
ClientCheatFly_Implementation() |
||
|
ClientCheatGhost() |
||
|
ClientCheatGhost_Implementation() |
||
|
ClientCheatWalk() |
||
|
ClientCheatWalk_Implementation() |
||
|
ClientMoveResponsePacked ( |
Client RPC that passes through to CharacterMovement (avoids RPC overhead for components). |
|
|
ClientMoveResponsePacked_Implementation ( |
Client RPC that passes through to CharacterMovement (avoids RPC overhead for components). |
|
|
ClientMoveResponsePacked_Validate ( |
Client RPC that passes through to CharacterMovement (avoids RPC overhead for components). |
|
|
ClientVeryShortAdjustPosition |
Bandwidth saving version, when velocity is zeroed |
|
|
ClientVeryShortAdjustPosition_Implementation |
Bandwidth saving version, when velocity is zeroed |
|
|
Crouch ( |
Request the character to start crouching. |
|
|
Falling() |
Called when the character's movement enters falling |
|
|
FillAsyncInput ( |
Async simulation API |
|
|
T * |
FindComponentByClass() |
|
|
FindRootMotionRepMove ( |
Find usable root motion replicated move from our buffer. |
|
|
float |
GetAnimRootMotionTranslationScale() |
Returns current value of AnimRootMotionScale |
|
UArrowCompon... |
GetArrowComponent() |
Returns ArrowComponent subobject |
|
const FBased... |
GetBasedMovement() |
Accessor for BasedMovement |
|
GetBaseRotationOffset() |
Get the saved rotation offset of mesh. |
|
|
GetBaseRotationOffsetRotator() |
Get the saved rotation offset of mesh. |
|
|
GetBaseTranslationOffset() |
Get the saved translation offset of mesh. |
|
|
UCapsuleComp... |
GetCapsuleComponent() |
Returns CapsuleComponent subobject |
|
UCharacterMo... |
GetCharacterMovement() |
Returns CharacterMovement subobject |
|
UAnimMontage... |
GetCurrentMontage() |
Return current playing Montage |
|
float |
GetJumpMaxHoldTime() |
Get the maximum jump time for the character. |
|
USkeletalMes... |
GetMesh() |
END DEPRECATED RPCs. |
|
const FBased... |
GetReplicatedBasedMovement() |
Accessor for ReplicatedBasedMovement |
|
GetReplicatedMovementMode() |
Returns ReplicatedMovementMode |
|
|
float |
GetReplicatedServerLastTransformUpdateTimeStamp() |
Accessor for ReplicatedServerLastTransformUpdateTimeStamp. |
|
FAnimMontage... |
GetRootMotionAnimMontageInstance() |
Get FAnimMontageInstance playing RootMotion |
|
HasAnyRootMotion() |
True if we are playing root motion from any source right now (anim root motion, root motion source) |
|
|
InitializeAsyncOutput ( |
||
|
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. |
|
|
IsPlayingNetworkedRootMotionMontage() |
True if we are playing Root Motion right now, through a Montage with RootMotionMode == ERootMotionMode::RootMotionFromMontagesOnly. |
|
|
IsPlayingRootMotion() |
True if we are playing Anim root motion right now |
|
|
Jump() |
Make the character jump on the next update. |
|
|
JumpIsAllowedInternal() |
||
|
K2_OnEndCrouch ( |
Event when Character stops crouching. |
|
|
K2_OnMovementModeChanged ( |
Called from CharacterMovementComponent to notify the character that the movement mode has changed. |
|
|
K2_OnStartCrouch ( |
Event when Character crouches. |
|
|
K2_UpdateCustomMovement ( |
Event for implementing custom character movement mode. |
|
|
Landed ( |
Called upon landing when falling, to perform actions based on the Hit result. |
|
|
LaunchCharacter |
Set a pending launch velocity on the Character. |
|
|
MoveBlockedBy ( |
Called when pawn's movement is blocked |
|
|
NotifyJumpApex() |
Called when character's jump reaches Apex. Needs CharacterMovement->bNotifyApex = true |
|
|
OnEndCrouch ( |
Called when Character stops crouching. |
|
|
OnJumped() |
Event fired when the character has just started jumping |
|
|
OnJumped_Implementation() |
Event fired when the character has just started jumping |
|
|
OnLanded ( |
Called upon landing when falling, to perform actions based on the Hit result. |
|
|
OnLaunched |
Let blueprint know that we were launched |
|
|
OnMovementModeChanged ( |
Called from CharacterMovementComponent to notify the character that the movement mode has changed. |
|
|
OnRep_IsCrouched() |
Handle Crouching replicated from server |
|
|
OnRep_ReplayLastTransformUpdateTimeStamp() |
||
|
OnRep_ReplicatedBasedMovement() |
Rep notify for ReplicatedBasedMovement |
|
|
OnRep_RootMotion() |
Handles replicated root motion properties on simulated proxies and position correction. |
|
|
OnStartCrouch ( |
Called when Character crouches. Called on non-owned Characters through bIsCrouched replication. |
|
|
OnUpdateSimulatedPosition |
Called on client after position update is received to respond to the new location and rotation. |
|
|
OnWalkingOffLedge |
Event fired when the Character is walking off a surface and is about to fall because CharacterMovement->CurrentFloor became unwalkable. |
|
|
OnWalkingOffLedge_Implementation |
Event fired when the Character is walking off a surface and is about to fall because CharacterMovement->CurrentFloor became unwalkable. |
|
|
float |
PlayAnimMontage ( |
Play Animation Montage on the character mesh. |
|
RecalculateCrouchedEyeHeight() |
Calculates the crouched eye height based on movement component settings |
|
|
ResetJumpState() |
Marks character as not trying to jump |
|
|
RestoreReplicatedMove ( |
Restore actor to an old buffered move. |
|
|
RootMotionDebugClientPrintOnScreen ( |
||
|
RootMotionDebugClientPrintOnScreen_Implementation ( |
||
|
SaveRelativeBasedMovement |
Save a new relative location in BasedMovement and a new rotation with is either relative or absolute. |
|
|
ServerMove ( |
BEGIN DEPRECATED RPCs that don't use variable sized payloads. Use ServerMovePacked and ClientMoveResponsePacked instead. |
|
|
ServerMove_Implementation ( |
BEGIN DEPRECATED RPCs that don't use variable sized payloads. Use ServerMovePacked and ClientMoveResponsePacked instead. |
|
|
ServerMove_Validate ( |
BEGIN DEPRECATED RPCs that don't use variable sized payloads. Use ServerMovePacked and ClientMoveResponsePacked instead. |
|
|
ServerMoveDual ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveDual_Implementation ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveDual_Validate ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveDualHybridRootMotion ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveDualHybridRootMotion_Implementation ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveDualHybridRootMotion_Validate ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveDualNoBase ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveDualNoBase_Implementation ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveDualNoBase_Validate ( |
Replicated function sent by client to server - contains client movement and view info for two moves. |
|
|
ServerMoveNoBase ( |
Replicated function sent by client to server. |
|
|
ServerMoveNoBase_Implementation ( |
Replicated function sent by client to server. |
|
|
ServerMoveNoBase_Validate ( |
Replicated function sent by client to server. |
|
|
ServerMoveOld ( |
Resending an (important) old move. Process it if not already processed. |
|
|
ServerMoveOld_Implementation ( |
Resending an (important) old move. Process it if not already processed. |
|
|
ServerMoveOld_Validate ( |
Resending an (important) old move. Process it if not already processed. |
|
|
ServerMovePacked ( |
Server RPC that passes through to CharacterMovement (avoids RPC overhead for components). |
|
|
ServerMovePacked_Implementation ( |
Server RPC that passes through to CharacterMovement (avoids RPC overhead for components). |
|
|
ServerMovePacked_Validate ( |
Server RPC that passes through to CharacterMovement (avoids RPC overhead for components). |
|
|
SetAnimRootMotionTranslationScale ( |
Sets scale to apply to root motion translation on this Character |
|
|
SetBase ( |
Sets the component the Character is walking on, used by CharacterMovement walking movement to be able to follow dynamic objects. |
|
|
ShouldNotifyLanded ( |
Returns true if the Landed() event should be called. |
|
|
SimulatedRootMotionPositionFixup ( |
Position fix up for Simulated Proxies playing Root Motion |
|
|
StopAnimMontage ( |
Stop Animation Montage. |
|
|
StopJumping() |
Stop the character from jumping on the next update. |
|
|
UnCrouch ( |
Request the character to stop crouching. |
Name | Description | ||
---|---|---|---|
|
DisplayDebug ( |
||
|
float |
GetDefaultHalfHeight() |
Returns The half-height of the default Pawn, scaled by the component scale. |
|
UPrimitiveCo... |
GetMovementBase() |
Return PrimitiveComponent we are based on (standing on, attached to, and moving on). |
|
UPawnMovemen... |
GetMovementComponent() |
Return our PawnMovementComponent, if we have one. |
|
PawnClientRestart() |
Called on the owning client of a player-controlled Pawn when it is restarted, this calls Restart() |
|
|
PossessedBy ( |
Called when this Pawn is possessed. Only called on the server (or in standalone). |
|
|
RecalculateBaseEyeHeight() |
Set BaseEyeHeight based on current state. |
|
|
Restart() |
Called when the Pawn is being restarted (usually by being possessed by a Controller). |
|
|
SetupPlayerInputComponent ( |
Allows a Pawn to set up custom input bindings. |
|
|
TurnOff() |
Freeze pawn - stop sounds, animations, physics, weapon firing |
|
|
UnPossessed() |
Called when our Controller no longer possesses us. Only called on the server (or in standalone). |
|
|
UpdateNavigationRelevance() |
Update all components relevant for navigation generators to match bCanAffectNavigationGeneration flag |
Name | Description | ||
---|---|---|---|
|
BeginPlay() |
Overridable native event for when play begins for this actor. |
|
|
ClearCrossLevelReferences() |
Do anything needed to clear out cross level references; Called from ULevel::PreSave |
|
|
UActorCompon... |
FindComponentByClass ( |
Searches components array and returns first encountered component of the specified class, native version of GetComponentByClass |
|
GetSimpleCollisionCylinder ( |
Get axis-aligned cylinder around this actor, used for simple collision checks (ie Pawns reaching a destination). |
|
|
NotifyActorBeginOverlap ( |
Event when this actor overlaps another actor, for example a player walking into a trigger. |
|
|
NotifyActorEndOverlap ( |
Event when an actor no longer overlaps another actor, and they have separated. |
|
|
OnRep_ReplicatedMovement() |
ReplicatedMovement struct replication event |
|
|
PostInitializeComponents() |
Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay |
|
|
PostNetReceiveLocationAndRotation() |
Update location and rotation from ReplicatedMovement. Not called for simulated physics! |
|
|
PreReplication ( |
Called on the actor right before replication occurs. |
|
|
PreReplicationForReplay ( |
Called on the actor right before replication occurs. |
|
|
SetReplicateMovement ( |
Set whether this actor's movement replicates to network clients. |
|
|
TornOff() |
Networking - called on client when actor is torn off (bTearOff==true), meaning it's no longer replicated to clients. |
Name | Description | ||
---|---|---|---|
|
GetLifetimeReplicatedProps ( |
Returns the properties used for network replication, this needs to be overridden by all actor classes with native replicated properties |
|
|
PostNetReceive() |
Always called immediately after properties are received from the remote. |
|
|
PreNetReceive() |
Always called immediately before properties are received from the remote. |
Name | Description | ||
---|---|---|---|
|
GetNavAgentLocation() |
Basically retrieved pawn's location on navmesh |
Name |
Description |
---|---|
CapsuleComponentName |
Name of the CapsuleComponent. |
CharacterMovementComponentName |
Name of the CharacterMovement component. |
MeshComponentName |
Name of the MeshComponent. |