Why does my mesh not render at certain angles?

I have a humanoid character with an animator controller and a camera attached to the neck bone, with an IK script making the hand and neck look towards another game object.

The camera is close in front of the character’s face, with minimal clipping plain of 0.01 (lowest possible), However at certain angles the character disappears from the camera.

The gif video above is how the problem looks, note that the mesh does not disappear in the inspector nor would it disappear if I push my camera far back to “always see the whole character”.

I have no idea what is the issue, I’ve confirmed clipping plain editing would only make certain bones disappear, however the entire object turns invisible at the mentioned angles.

Any help on getting the hand to never disappear would be highly appreciated.

Answering my own question in case anyone takes a look at it in the future.
Apparently the camera can mark certain game objects as ‘behind it’ and when that happens they will not render on it at all, the solution however is pretty simple!

Simply go to the meshrenderer of your game object and check the ‘Update when offscreen’ box, and the object should no longer randomly disappear from the camera.

Adjusting the bounds of your mesh can be helpful for solving this problem.

The bounds dictate the area in which the mesh will render, and if you’re doing any kind of deformations on the vertices/geometry of the mesh, that may move part or all of it outside of those bounds.

To test this, use something like the following code to set the bounds very high, and see if it fixes the issue:

private void Start()
    {
        Mesh m = GetComponent<MeshFilter>().mesh;
        mesh.bounds = new Bounds(Vector3.zero, Vector3.one * 2000);

        //mesh.bounds is in local/object space, so
        //setting a center of zero and extents of 2000 will
        //expand the bounds into a box 2000 units wide around
        //the center of the object
    }

look of OCCLUSION IS OFFFF and test with different settings when putting back on again

I’m having a similar problem witch some blend shape created automatic doors. If I look at it from around a 45 degree angle or more, the door disappears. The doors look good other than that so I might solve it in some banal copy way. Any thoughts on that problem other than the solutions listed here?

I had a very similar problem of meshes not rendering at certain angles or being able to see through to other parts of the mesh. I switched from the Unity standard shader to a custom shader and the issue went away.

May not be a solution but may help others troubleshoot their own issues.

If its a skin mesh renderer this can happen due to the meshes bounds. This can be fixed by viewing the component in the inspector and clicking the edit bounds button. You’ll see in seen view there is a bounding box around the skinned object with points in the center of each of the boxes faces.

www.mybalancenow.com