![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Character.h>
Inheritance diagram for ACharacter:Static Public Attributes | |
| static ENGINE_API FName | MeshComponentName |
| static ENGINE_API FName | CharacterMovementComponentName |
| static ENGINE_API FName | CapsuleComponentName |
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.
| ACharacter::ACharacter | ( | const FObjectInitializer & | ObjectInitializer = FObjectInitializer::Get() | ) |
Default UObject constructor.
| void ACharacter::ApplyAsyncOutput | ( | const FCharacterAsyncOutput & | Output | ) |
|
virtual |
Apply momentum caused by damage.
|
protectedvirtual |
Event called after actor's base changes (if SetBase was requested to notify us with bNotifyPawn).
|
overridevirtual |
|
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.
|
virtual |
| 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.
|
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.
|
protectedvirtual |
| bool ACharacter::CanUseRootMotionRepMove | ( | const FSimulatedRootMotionReplicatedMove & | RootMotionRepMove, |
| const FAnimMontageInstance & | ClientMontageInstance | ||
| ) | const |
True if buffered move is usable to teleport client back to.
Trigger jump if jump button has been pressed.
|
overridevirtual |
Update jump input state after having checked input.
| 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
| 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.
| void ACharacter::ClientAdjustPosition_Implementation | ( | float | TimeStamp, |
| FVector | NewLoc, | ||
| FVector | NewVel, | ||
| UPrimitiveComponent * | NewBase, | ||
| FName | NewBaseBoneName, | ||
| bool | bHasBase, | ||
| bool | bBaseRelativePosition, | ||
| uint8 | ServerMovementMode | ||
| ) |
| 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)
| 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 | ||
| ) |
| 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.
| 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 | ||
| ) |
| ENGINE_API void ACharacter::ClientCheatFly | ( | ) |
|
virtual |
| ENGINE_API void ACharacter::ClientCheatGhost | ( | ) |
|
virtual |
| ENGINE_API void ACharacter::ClientCheatWalk | ( | ) |
|
virtual |
| ENGINE_API void ACharacter::ClientMoveResponsePacked | ( | const FCharacterMoveResponsePackedBits & | PackedBits | ) |
| void ACharacter::ClientMoveResponsePacked_Implementation | ( | const FCharacterMoveResponsePackedBits & | PackedBits | ) |
| bool ACharacter::ClientMoveResponsePacked_Validate | ( | const FCharacterMoveResponsePackedBits & | PackedBits | ) |
| ENGINE_API void ACharacter::ClientVeryShortAdjustPosition | ( | float | TimeStamp, |
| FVector | NewLoc, | ||
| UPrimitiveComponent * | NewBase, | ||
| FName | NewBaseBoneName, | ||
| bool | bHasBase, | ||
| bool | bBaseRelativePosition, | ||
| uint8 | ServerMovementMode | ||
| ) |
| void ACharacter::ClientVeryShortAdjustPosition_Implementation | ( | float | TimeStamp, |
| FVector | NewLoc, | ||
| UPrimitiveComponent * | NewBase, | ||
| FName | NewBaseBoneName, | ||
| bool | bHasBase, | ||
| bool | bBaseRelativePosition, | ||
| uint8 | ServerMovementMode | ||
| ) |
Request the character to start crouching. The request is processed on the next update of the CharacterMovementComponent.
|
overridevirtual |
Called when the character's movement enters falling
| void ACharacter::FillAsyncInput | ( | FCharacterAsyncInput & | Input | ) | const |
Async simulation API
|
inline |
|
overridevirtual |
| 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.
|
overridevirtual |
| float ACharacter::GetAnimRootMotionTranslationScale | ( | ) | const |
Scale to apply to root motion translation on this Character. Returns current value of AnimRootMotionScale.
|
inline |
Accessor for BasedMovement
Get the saved rotation offset of mesh. This is how much extra rotation is applied from the capsule rotation.
|
inline |
Get the saved rotation offset of mesh. This is how much extra rotation is applied from the capsule rotation.
|
inline |
Get the saved translation offset of mesh. This is how much extra offset is applied from the center of the capsule.
|
inline |
Returns CapsuleComponent subobject
|
inline |
Returns CharacterMovement subobject
|
inline |
| class UAnimMontage * ACharacter::GetCurrentMontage | ( | ) | const |
Return current playing Montage
|
overridevirtual |
|
overridevirtual |
Returns vector direction of gravity
|
overridevirtual |
Returns a quaternion transforming from world space into gravity relative space
|
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).
|
overridevirtual |
|
inline |
Returns Mesh subobject
|
inlinefinaloverridevirtual |
|
overridevirtual |
|
overridevirtual |
|
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
|
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.
|
inline |
Accessor for ReplicatedBasedMovement
|
protected |
This is the Replicated version of relative movement. Do not modify on simulated proxies! Returns non-const ReplicatedBasedMovement.
|
overridevirtual |
|
virtual |
Returns replicated gravity direction for simulated proxies
|
inline |
CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. Use CharacterMovementComponent::UnpackNetworkMovementMode() to translate it. Returns ReplicatedMovementMode
|
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.
|
inline |
Replicated Root Motion montage. Returns RepRootMotion
| FRepRootMotionMontage & ACharacter::GetRepRootMotion_Mutable | ( | ) |
Replicated Root Motion montage. Returns non-const RepRootMotion
| FAnimMontageInstance * ACharacter::GetRootMotionAnimMontageInstance | ( | ) | const |
Get FAnimMontageInstance playing RootMotion
|
overridevirtual |
| bool ACharacter::HasAnyRootMotion | ( | ) | const |
True if we are playing root motion from any source right now (anim root motion, root motion source)
| void ACharacter::InitializeAsyncOutput | ( | FCharacterAsyncOutput & | Output | ) | const |
| bool ACharacter::IsCrouched | ( | ) | const |
Set by character movement to specify that this Character is currently crouched. This function returns bIsCrouched.
|
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.
| 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.
| bool ACharacter::IsPlayingRootMotion | ( | ) | const |
True if we are playing Anim root motion right now
|
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.
|
protected |
| ENGINE_API void ACharacter::K2_OnEndCrouch | ( | float | HalfHeightAdjust, |
| float | ScaledHalfHeightAdjust | ||
| ) |
Event when Character stops crouching.
| HalfHeightAdjust | difference between default collision half-height, and actual crouched capsule half-height. |
| ScaledHalfHeightAdjust | difference after component scale is taken in to account. |
| 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.
| PrevMovementMode | Movement mode before the change |
| NewMovementMode | New movement mode |
| PrevCustomMode | Custom mode before the change (applicable if PrevMovementMode is Custom) |
| NewCustomMode | New custom mode (applicable if NewMovementMode is Custom) |
| ENGINE_API void ACharacter::K2_OnStartCrouch | ( | float | HalfHeightAdjust, |
| float | ScaledHalfHeightAdjust | ||
| ) |
Event when Character crouches.
| HalfHeightAdjust | difference between default collision half-height, and actual crouched capsule half-height. |
| ScaledHalfHeightAdjust | difference after component scale is taken in to account. |
| ENGINE_API void ACharacter::K2_UpdateCustomMovement | ( | float | DeltaTime | ) |
Event for implementing custom character movement mode. Called by CharacterMovement if MovementMode is set to Custom.
|
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).
| Hit | Result describing the landing that resulted in a valid landing spot. |
|
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.
|
inlinevirtual |
Called when pawn's movement is blocked
| Impact | describes the blocking hit. |
|
virtual |
Called when character's jump reaches Apex. Needs CharacterMovement->bNotifyApex = true
Called when Character stops crouching. Called on non-owned Characters through bIsCrouched replication.
| HalfHeightAdjust | difference between default collision half-height, and actual crouched capsule half-height. |
| ScaledHalfHeightAdjust | difference after component scale is taken in to account. |
| ENGINE_API void ACharacter::OnJumped | ( | ) |
Event fired when the character has just started jumping
|
virtual |
| 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).
| Hit | Result describing the landing that resulted in a valid landing spot. |
| ENGINE_API void ACharacter::OnLaunched | ( | FVector | LaunchVelocity, |
| bool | bXYOverride, | ||
| bool | bZOverride | ||
| ) |
Let blueprint know that we were launched
|
virtual |
Called from CharacterMovementComponent to notify the character that the movement mode has changed.
| PrevMovementMode | Movement mode before the change |
| PrevCustomMode | Custom mode before the change (applicable if PrevMovementMode is Custom) |
|
virtual |
Handle Crouching replicated from server
| void ACharacter::OnRep_ReplayLastTransformUpdateTimeStamp | ( | ) |
|
virtual |
Rep notify for ReplicatedBasedMovement
|
overridevirtual |
| void ACharacter::OnRep_RootMotion | ( | ) |
Handles replicated root motion properties on simulated proxies and position correction.
Called when Character crouches. Called on non-owned Characters through bIsCrouched replication.
| HalfHeightAdjust | difference between default collision half-height, and actual crouched capsule half-height. |
| ScaledHalfHeightAdjust | difference after component scale is taken in to account. |
|
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.
| 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.
| PreviousFloorImpactNormal | Normal of the previous walkable floor. |
| PreviousFloorContactNormal | Normal of the contact with the previous walkable floor. |
| PreviousLocation | Previous character location before movement off the ledge. |
| TimeTick | Time delta of movement update resulting in moving off the ledge. |
|
virtual |
|
overridevirtual |
|
virtual |
Play Animation Montage on the character mesh. Returns the length of the animation montage in seconds, or 0.f if failed to play.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Reimplemented in AEQSTestingPawn.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Called on the actor right before replication occurs. Only called on Server, and for autonomous proxies if recording a Client Replay.
|
overridevirtual |
Called on the actor right before replication occurs. Called for everyone when recording a Client Replay, including Simulated Proxies.
|
overridevirtual |
| void ACharacter::RecalculateCrouchedEyeHeight | ( | ) |
Calculates the crouched eye height based on movement component settings
|
virtual |
Marks character as not trying to jump
|
overridevirtual |
| bool ACharacter::RestoreReplicatedMove | ( | const FSimulatedRootMotionReplicatedMove & | RootMotionRepMove | ) |
Restore actor to an old buffered move.
| ENGINE_API void ACharacter::RootMotionDebugClientPrintOnScreen | ( | const FString & | InString | ) |
|
virtual |
| 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.
| 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.
| void ACharacter::ServerMove_Implementation | ( | float | TimeStamp, |
| FVector_NetQuantize10 | InAccel, | ||
| FVector_NetQuantize100 | ClientLoc, | ||
| uint8 | CompressedMoveFlags, | ||
| uint8 | ClientRoll, | ||
| uint32 | View, | ||
| UPrimitiveComponent * | ClientMovementBase, | ||
| FName | ClientBaseBoneName, | ||
| uint8 | ClientMovementMode | ||
| ) |
| bool ACharacter::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 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.
| 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 | ||
| ) |
| 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 | ||
| ) |
| 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.
| 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 | ||
| ) |
| 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 | ||
| ) |
| 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.
| 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 | ||
| ) |
| 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 | ||
| ) |
| 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.
| void ACharacter::ServerMoveNoBase_Implementation | ( | float | TimeStamp, |
| FVector_NetQuantize10 | InAccel, | ||
| FVector_NetQuantize100 | ClientLoc, | ||
| uint8 | CompressedMoveFlags, | ||
| uint8 | ClientRoll, | ||
| uint32 | View, | ||
| uint8 | ClientMovementMode | ||
| ) |
| bool ACharacter::ServerMoveNoBase_Validate | ( | float | TimeStamp, |
| FVector_NetQuantize10 | InAccel, | ||
| FVector_NetQuantize100 | ClientLoc, | ||
| uint8 | CompressedMoveFlags, | ||
| uint8 | ClientRoll, | ||
| uint32 | View, | ||
| uint8 | ClientMovementMode | ||
| ) |
| ENGINE_API void ACharacter::ServerMoveOld | ( | float | OldTimeStamp, |
| FVector_NetQuantize10 | OldAccel, | ||
| uint8 | OldMoveFlags | ||
| ) |
| void ACharacter::ServerMoveOld_Implementation | ( | float | OldTimeStamp, |
| FVector_NetQuantize10 | OldAccel, | ||
| uint8 | OldMoveFlags | ||
| ) |
| bool ACharacter::ServerMoveOld_Validate | ( | float | OldTimeStamp, |
| FVector_NetQuantize10 | OldAccel, | ||
| uint8 | OldMoveFlags | ||
| ) |
| ENGINE_API void ACharacter::ServerMovePacked | ( | const FCharacterServerMovePackedBits & | PackedBits | ) |
| void ACharacter::ServerMovePacked_Implementation | ( | const FCharacterServerMovePackedBits & | PackedBits | ) |
| bool ACharacter::ServerMovePacked_Validate | ( | const FCharacterServerMovePackedBits & | PackedBits | ) |
Sets scale to apply to root motion translation on this Character
|
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.
Specifies whether this Character is currently crouched or not. This function sets bIsCrouched and marks property as dirty.
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
|
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.
|
protected |
This is the Replicated version of relative movement. Do not modify on simulated proxies! Sets ReplicatedBasedMovement
|
protected |
CharacterMovement Custom gravity direction replicated for simulated proxies. This function sets ReplicatedGravityDirection and also marks property as dirty.
Sets CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. Use CharacterMovementComponent::UnpackNetworkMovementMode() to translate it. This function sets the compressed value of ReplicatedMovementMode.
|
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.
Set whether this actor's movement replicates to network clients.
| void ACharacter::SetRepRootMotion | ( | const FRepRootMotionMontage & | InRepRootMotion | ) |
Replicated Root Motion montage. Sets RepRootMotion
|
overridevirtual |
|
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. .
Whether this Character should include acceleration data in its replicated movement
Position fix up for Simulated Proxies playing Root Motion
|
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.
|
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.
|
overridevirtual |
|
overridevirtual |
Request the character to stop crouching. The request is processed on the next update of the CharacterMovementComponent.
|
overridevirtual |
|
overridevirtual |
|
protected |
Scale to apply to root motion translation on this Character
|
protected |
Info about our current movement base (object we are standing on).
|
protected |
Saved rotation offset of mesh.
|
protected |
Saved translation offset of mesh.
| uint8 ACharacter::bClientCheckEncroachmentOnNetUpdate |
| uint8 ACharacter::bClientResimulateRootMotion |
If server disagrees with root motion track position, client has to resimulate root motion from last AckedMove.
| uint8 ACharacter::bClientResimulateRootMotionSources |
If server disagrees with root motion state, client has to resimulate root motion from last AckedMove.
| uint8 ACharacter::bClientUpdating |
When true, applying updates to network client (replaying saved moves for a locally controlled character)
| uint8 ACharacter::bClientWasFalling |
True if Pawn was initially falling when started to replay network moves.
|
protected |
Flag that we are receiving replication of the based movement.
| uint8 ACharacter::bIsCrouched |
Set by character movement to specify that this Character is currently crouched.
| uint8 ACharacter::bPressedJump |
When true, player wants to jump
| 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.
| 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.
| uint8 ACharacter::bSimGravityDisabled |
Disable simulated gravity (set when character encroaches geometry on client, to keep it from falling through floors)
| uint8 ACharacter::bWasJumping |
Tracks whether or not the character was already jumping last frame.
|
static |
Name of the CapsuleComponent.
|
static |
Name of the CharacterMovement component. Use this name if you want to use a different class (with ObjectInitializer.SetDefaultSubobjectClass).
| FRootMotionMovementParams ACharacter::ClientRootMotionParams |
For LocallyControlled Autonomous clients. Saved root motion data to be used by SavedMoves.
| float ACharacter::CrouchedEyeHeight |
Default crouched eye height
| 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.
| 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.
| float ACharacter::JumpForceTimeRemaining |
Amount of jump force time remaining, if JumpMaxHoldTime > 0.
| float ACharacter::JumpKeyHoldTime |
Jump key Held Time. This is the time that the player has held the jump key, in seconds.
| 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).
| 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).
| 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).
| Hit | Result describing the landing that resulted in a valid landing spot. |
|
static |
Name of the MeshComponent. Use this name if you want to prevent creation of the component (with ObjectInitializer.DoNotCreateDefaultSubobject).
| FMovementModeChangedSignature ACharacter::MovementModeChangedDelegate |
Multicast delegate for MovementMode changing.
| uint32 ACharacter::NumActorOverlapEventsCounter |
Incremented every time there is an Actor overlap event (start or stop) on this actor.
| 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.
| DeltaSeconds | Delta time in seconds for this update |
| InitialLocation | Location at the start of the update. May be different than the current location if movement occurred. |
| InitialVelocity | Velocity at the start of the update. May be different than the current velocity. |
| FCharacterReachedApexSignature ACharacter::OnReachedJumpApex |
Broadcast when Character's jump reaches its apex. Needs CharacterMovement->bNotifyApex = true
|
protected |
Cached version of the replicated gravity direction before replication. Used to compare if the value was changed as a result of replication.
| float ACharacter::ProxyJumpForceStartedTime |
Track last time a jump force started for a proxy.
|
protected |
|
protected |
Replicated version of relative movement. Read-only on simulated proxies!
|
protected |
CharacterMovement Custom gravity direction replicated for simulated proxies.
|
protected |
CharacterMovement MovementMode (and custom mode) replicated for simulated proxies. Use CharacterMovementComponent::UnpackNetworkMovementMode() to translate it.
|
protected |
CharacterMovement ServerLastTransformUpdateTimeStamp value, replicated to simulated proxies.
| struct FRepRootMotionMontage ACharacter::RepRootMotion |
Replicated Root Motion montage
| TArray<FSimulatedRootMotionReplicatedMove> ACharacter::RootMotionRepMoves |
Array of previously received root motion moves from the server.
| 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