Open gabrielgilvan opened 1 week ago
Code looks correct to me. It's tracing the body aabb upwards by 100 units, then returning the distance it got.
Is your problem more that he's reacting to the low ceiling too early? At the moment it starts reacting if something is 50 units above the head, we should bring that down a bit? 10 maybe?
50 units looks way better but why not stick an variable to that ?
Describe the bug
The UpdateHeadroom function in the PlayerController component is incorrectly calculating the headroom offset. This issue causes the player to start ducking even when the ceiling or an overhead object is not close. For example, passing through a doorway incorrectly triggers the ducking behavior.
To Reproduce
Expected behavior
The player should only duck when the object above is within a valid proximity.
Media/Files
Additional context
No response