Screen Space Drawing Jitters when Camera is Moved

Lines drawn in screen space drift and jitter when the camera is moved.

public override void DrawGizmos()
{
     using (Draw.InScreenSpace(SceneView.GetAllSceneCameras()[0]))
     {
          Draw.Line(Vector3.zero, new Vector3(500.0f, 500.0f, 0.0f));
     }
}

Hi

I think the scene camera moves after DrawGizmos is called. To draw robustly in the scene view, I think you will have to do it from OnSceneGUI.

1 Like