UCharacterMovementComponent::PrePhysicsTickComponent
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtual
Description
Tick function that runs before the physics simulation step, used to feed movement-derived forces or velocity changes into physics before it advances.
Caveats & Gotchas
- • Runs on a separate tick function (PrePhysicsTickFunction) from the main TickComponent, ordered explicitly to execute before the physics scene simulates — don't assume it runs in the same call stack as TickComponent.
- • Only meaningful for characters interacting with physics (e.g. pushing physics objects, being on a physically simulated base); characters that never touch physics won't see meaningful work happen here.
- • Overriding without calling the base implementation can break physics interaction force accumulation for that character.
Signature
virtual void PrePhysicsTickComponent(float DeltaTime, FCharacterMovementComponentPrePhysicsTickFunction& ThisTickFunction) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeltaTime | float | Time in seconds since the last pre-physics tick. | — |
| ThisTickFunction | FCharacterMovementComponentPrePhysicsTickFunction& | The pre-physics tick function that triggered this call. | — |
Return Type
void Example
Pre-physics tick function relationship (engine-internal) C++
// Bound to PrePhysicsTickFunction and executed by the tick manager before the physics scene
// advances. Not intended to be called directly from gameplay code.
virtual void PrePhysicsTickComponent(float DeltaTime, FCharacterMovementComponentPrePhysicsTickFunction& ThisTickFunction); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?