UCharacterMovementComponent::PostPhysicsTickComponent
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtual
Description
Called after the synchronous physics scene finishes simulating for the frame, before cloth simulation runs. Used to reconcile movement state with physics results, such as physics-driven root motion.
Caveats & Gotchas
- • Runs on the PostPhysicsTickFunction, which is a separate tick group from the main TickComponent() pass — code here executes later in the frame even though both are driven by the same component.
- • Only useful when physics simulation (ragdolls, physical animation, physics-based root motion sources) can affect this character's movement state within the same frame.
- • Overriding without calling the base implementation can leave physics-authored root motion unresolved for that frame.
Signature
virtual void PostPhysicsTickComponent(float DeltaTime, FCharacterMovementComponentPostPhysicsTickFunction& ThisTickFunction) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeltaTime | float | Frame time in seconds since the last post-physics tick. | — |
| ThisTickFunction | FCharacterMovementComponentPostPhysicsTickFunction& | The tick function driving this call, useful for inspecting tick dependency state. | — |
Return Type
void Example
Overriding to react to physics results C++
void UMyCharacterMovementComponent::PostPhysicsTickComponent(float DeltaTime, FCharacterMovementComponentPostPhysicsTickFunction& ThisTickFunction)
{
Super::PostPhysicsTickComponent(DeltaTime, ThisTickFunction);
// React to physics-driven root motion or ragdoll blend results here.
if (CharacterOwner && CharacterOwner->GetMesh())
{
SyncCapsuleToPhysicsMesh();
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?