Scene editor camera is cutting off my objects

hello everyone.

while in my scene. (not game!) the display is bugging.


as you can see. my scene camera is like 10meters away from the object but they are disapearing…

how can i fix this?

2 Likes

This is caused by the near clip plane being too far away. I believe the near clip is adjusted each time you focus the camera on an object (by selecting something and pressing F). It does so based on the size of what you’re asking to focus on. If you’ve got a huge mesh and focussed on it, the scene camera will have pulled right out to fit it all in view and adjusted the clip plane accordingly.

So, select something small and press F. See if that fixes things for you.

101 Likes

this fixed it for me! huge thanks to u my friend!

8 Likes

3820288--321598--Iso.JPGJust change to Persp

70 Likes

Thank you @mark_cb from 2016! Your answer is still helping people 2019!

8 Likes

ya it just helped me, i selected a object and pressed F which fixed the clipping issue. ty so much

5 Likes

Thank you very much, this fixed it for me also :slight_smile:

Yep, helps me in late 2019 also. But I have to admit, I haven’t yet learned what a “clip plane” is or why a “near one” could be too far away. But using F on something small works… Maybe I will understand someday… note, my game is 2D… and a few simple rectangular objects were getting chopped off in the most illogical ways… :slight_smile: Anyway, THANKS.

Picked this up from a gist, very nice.
Could be modified to do far also I think.

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SceneViewFocusChangerWindow.cs" company="Supyrb">
//   Copyright (c) 2018 Supyrb. All rights reserved.
// </copyright>
// <author>
//   Johannes Deml
//   send@johannesdeml.com
// </author>
// --------------------------------------------------------------------------------------------------------------------

using UnityEditor;
using UnityEngine;

namespace Supyrb
{
    /// <summary>
    /// Handy little tool to quickly change the focus of unity to avoid clipping in the scene view
    /// From https://forum.unity.com/threads/change-near-clipping-plane-scene-camera.456078/#post-3525716
    /// And https://gist.github.com/JohannesDeml/47dde1617161acfcd533abb715475017
    /// </summary>
    public class SceneViewFocusChangerWindow : EditorWindow
    {
        private static float nearClipping;

        [MenuItem("Window/Scene Camera clipping")]
        static void Init()
        {
            SceneViewFocusChangerWindow window = (SceneViewFocusChangerWindow)EditorWindow.GetWindow(typeof(SceneViewFocusChangerWindow));
            window.Show();
        }

        private void OnInspectorUpdate()
        {
            Repaint();
        }

        void OnGUI()
        {
            EditorGUILayout.LabelField("Scene Camera near clipping", EditorStyles.boldLabel);
            var lastSceneView = SceneView.lastActiveSceneView;
            if (lastSceneView == null || lastSceneView.camera == null)
            {
                EditorGUILayout.HelpBox("No Scene view found", MessageType.Error);
                return;
            }

            nearClipping = lastSceneView.camera.nearClipPlane;
            EditorGUI.BeginChangeCheck();
            {
                nearClipping = EditorGUILayout.Slider("Near clipping", nearClipping, 0.01f, 20f);
            }
            if (EditorGUI.EndChangeCheck())
            {
                lastSceneView.size = nearClipping * 100f;
                lastSceneView.Repaint();
            }

            // Instant focus to a near position without caring about the last pivot
            if (GUILayout.Button("Focus near"))
            {
                lastSceneView.LookAt(lastSceneView.camera.transform.position + lastSceneView.camera.transform.forward * 3f, lastSceneView.rotation, 3f);
            }
        }
    }
}

you are my hero

1 Like

2020!

I had the same problem but the F key didn’t fix this, after further investigation I found my problem was the Main Camera position being to low. After adjusting the height above the ground plane all works great now.
Hope this help others.
PyJai

1 Like

Thank you!

Thanks bro

In the screenshot he’s already in perspective mode, but doing what you said fixed my clipping issue so thanks.

thanks bro…

And in 2021

If hitting F doesn’t work (like in my case in 2022.1.0b4), you can also just double click a gameobject in the scene hierarchy, it will do the trick.

1 Like

BRO THX

I’ve been using Unity for years now and got stumped on this one. Lol. Thank you for the solution!