APawn::BaseEyeHeight
#include "GameFramework/Pawn.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
The height of the pawn's eye position above the collision center, in unreal units. Used by GetPawnViewLocation() and GetActorEyesViewPoint() to offset traces and camera queries from the root component origin.
Caveats & Gotchas
- • ACharacter sets this to CrouchedEyeHeight at runtime when crouching; if you override BaseEyeHeight on a Character subclass, also set CrouchedEyeHeight or crouching will snap the view to the wrong height.
- • This is distinct from the actual camera spring arm length — changing BaseEyeHeight only affects engine sight line queries, not the visible camera position unless your camera setup reads GetPawnViewLocation().
Signature
float BaseEyeHeight Examples
Configure eye height in BeginPlay then sample the view point
Blueprint
Set a custom eye height in the constructor C++
AMyPawn::AMyPawn()
{
// Eyes are 160 cm above the capsule base
BaseEyeHeight = 160.f;
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?