RealDocs

UCharacterMovementComponent::GetMovementBase

function Engine Blueprint Since 4.0
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Returns the primitive component the character is currently standing on, or null if not based on anything.

Caveats & Gotchas

  • Simply forwards to CharacterOwner->GetMovementBase() — returns null if CharacterOwner isn't set, not only when there's no base.
  • The base is actively tracked while walking; during other movement modes (Falling, Flying, Swimming) it may still reflect the last ground contact rather than 'nothing'.

Signature

UPrimitiveComponent* GetMovementBase() const

Return Type

UPrimitiveComponent*

Example

Check what the character is standing on C++
if (UPrimitiveComponent* Base = GetCharacterMovement()->GetMovementBase())
{
	UE_LOG(LogTemp, Log, TEXT("Standing on %s"), *Base->GetName());
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.