ACharacter::GetMovementBase
#include "GameFramework/Character.h"
Access: public
Specifiers: virtualoverride
Description
Returns the primitive component the character is currently standing on (its movement base). Returns nullptr when the character is airborne or has no base.
Caveats & Gotchas
- • This function is marked final — you cannot override it in subclasses. Use SetBase() or listen to BaseChange() if you need to react to base changes.
- • On simulated proxies, the base may not have resolved yet if it references a component that hasn't streamed in — check FBasedMovementInfo::IsBaseUnresolved() if you need to distinguish between 'no base' and 'base pending'.
Signature
virtual UPrimitiveComponent* GetMovementBase() const override final { return BasedMovement.MovementBase; } Return Type
UPrimitiveComponent* Example
Check if standing on a moving platform C++
UPrimitiveComponent* Base = GetMovementBase();
if (Base && Base->IsSimulatingPhysics())
{
// Character is on a simulated physics object
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?