RealDocs

UCharacterMovementComponent::GetActorFeetLocation

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

Description

Returns the location of the character's feet — the base of the collision capsule — rather than the capsule's center, which is what GetActorLocation() returns.

Caveats & Gotchas

  • Overrides UNavMovementComponent's version; it computes the location from the current capsule half-height rather than caching it, so it's cheap but not free to call every frame in tight loops.
  • Used internally by the navigation system (e.g. path following, nav floor projection) to reason about ground contact instead of the capsule's origin.
  • Not the same as the floor impact point from a floor sweep — this is a fixed offset below the actor's location based on capsule half-height, regardless of actual ground contact.

Signature

virtual FVector GetActorFeetLocation() const override;

Return Type

FVector

Example

Getting the ground-contact point for effects C++
void AMyCharacter::SpawnFootstepDecal()
{
	if (UCharacterMovementComponent* MoveComp = GetCharacterMovement())
	{
		const FVector FeetLocation = MoveComp->GetActorFeetLocation();
		// Use FeetLocation to spawn a decal or particle at ground level.
	}
}

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.