UCharacterMovementComponent::OnRegister
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualoverride
Description
Called when the component is registered with its owning actor. Disables RVO avoidance on network clients and sets the network smoothing mode based on whether the world is playing a replay or running as a listen server.
Caveats & Gotchas
- • If bUseRVOAvoidance is true and the component registers on a network client, avoidance is silently disabled since it's server-authoritative.
- • Always call Super::OnRegister() first when overriding — the base implementation configures RVO and network smoothing before any custom setup runs.
- • In WITH_EDITOR builds it also recomputes WalkableFloorZ from WalkableFloorAngle, so changing the angle only takes effect after (re)registration.
Signature
virtual void OnRegister() override Return Type
void Example
Extending OnRegister C++
void UMyCharacterMovementComponent::OnRegister()
{
Super::OnRegister();
// Custom setup that relies on RVO/network smoothing already being configured
NavAgentProps.AgentRadius = 40.f;
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?