RealDocs

ACharacter::CrouchedEyeHeight

property Engine Blueprint Since 4.0
#include "GameFramework/Character.h"
Access: public Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite

Description

The eye height (in unscaled units from the bottom of the capsule) used when the character is crouched. The player controller and camera manager use this value to position the view.

Caveats & Gotchas

  • This value is in capsule-local space, measured from the capsule's base, not from its center. Setting it to match `CapsuleHalfHeight` when crouched places the eye at the top of the capsule — generally too high.
  • The default value is 32 units (half of a typical crouched capsule half-height of 40). If you change the crouched capsule half-height in `CharacterMovement->CrouchedHalfHeight`, you should update this property to match your design intent.
  • Camera managers read this value during `CalcCamera` on the player controller. Third-person cameras that don't use the built-in eye height system won't automatically respond to this property — you must manually interpolate to the crouched camera position in your own camera logic.

Signature

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Camera)
float CrouchedEyeHeight

Examples

Set CrouchedEyeHeight on BeginPlay for a custom crouch capsule Blueprint
Event BeginPlay Get Player Character Player Index 0 0 Return Value Cast To AMyCharacter Object Cast Failed As A My Character As A My Character Set Crouched Eye Height Target is Character Target Crouched Eye Height Crouched Eye Height 40.0 40.0
Edit Blueprint graph Set CrouchedEyeHeight on BeginPlay for a custom crouch capsule
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Set crouched eye height to match a custom capsule size C++
AMyCharacter::AMyCharacter()
{
	// Crouched half-height is 50 units, so center is at 50. Eye is near top.
	GetCharacterMovement()->CrouchedHalfHeight = 50.f;
	CrouchedEyeHeight = 40.f;  // 40 units from capsule base
}

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.