Why can players peek into the Void

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
Posts: 3048
Joined: Wed Jul 18, 2018 6:14 pm
Location: France

Why can players peek into the Void

Post by pango »

I've been wondering why players can sometimes see thru ceilings into the Void, and noticed something:
If, inside the editor, you look at player's model, or at player under normal conditions, you can check that the camera and the part of the near clip plane that's within field of view and both nicely inside the character controller capsule:
player model.jpg
player model.jpg (30.84 KiB) Viewed 1115 times
However, when you can peek inside the Void, the camera gets outside of the capsule:
player camera.jpg
player camera.jpg (71.24 KiB) Viewed 1115 times
That puzzled me for a moment, and my hypothesis is that the culprit is the head dipping mechanism, that shortens the character controller capsule, but neither the smooth follower nor the camera that's attached to it are adjusted for that change.
(I noticed that the head dipping itself depends on camera position, so fixing the issue may be more involved than expected...)
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Posts: 6513
Joined: Sun Mar 22, 2015 1:51 am

Re: Why can players peek into the Void

Post by Interkarma »

This used to happen with crouch as well.

I didn't think of this case with head-dipping, which was only meant to be a momentary thing when crossing through certain low doorways. There's also an unsatisfying "bounce" if you can position head-dip right in the sweet spot.

I'm not so worried about this case, but it would be nice to polish out later if it doesn't create problems elsewhere.

Post Reply