I have a character (and I am using Opsive’s Ultimate Character Controller, although I don’t think it makes a difference). When I adjust the camera’s point of view and get too close, I see though the characters clothes, and see a naked body. Is there any way to prevent this?
I am using Unity version 2018.3.0f2
Adjust the focal length (zoom) or orthographic scale instead of moving the camera.
This is age old game problem…
for example, camera follows character… if character backs up to a wall… camera goes through wall and player sees bad view.
also… you add collisions to camera… if to gets pushed back through wall… The collisions push the camera forwards, so it does not go through the wall… but now the camera is pushed too close or into the character… so you see inside the character… how to fix ?
Multiple ways to hide / fix this but most are not perfect.
adjust camera clip ranges compared to the size of your camera, so the camera only clips into geometry if it is very close to the geometry, but this may rendering z accuracy at long distances… maybe
And it still doesn;t fix camera going actually inside geometry.
Add camera collisions with scene geometry. and with character geometry (or a simple box or cylinder representing character’s space) imaging a line between character and camera point… camera can slide back and forth, with collisions at front and back. You must choose which collisions take priority (world or character)
you can also do other things like… fade out world geometry or the player when it gets too close to the camera… this is generally easier with character to fade out than with world. world objects temd to be large and look strange when faded out.