From 5436298947cda9d0cc91d9603aa3413425756a80 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Mon, 8 May 2023 17:40:11 +0300 Subject: [PATCH] [3D cels] Do not display the object outline if it's behind the camera --- src/UI/Canvas/Gizmos3D.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UI/Canvas/Gizmos3D.gd b/src/UI/Canvas/Gizmos3D.gd index 3eeabfc8a..0d312ec30 100644 --- a/src/UI/Canvas/Gizmos3D.gd +++ b/src/UI/Canvas/Gizmos3D.gd @@ -96,7 +96,8 @@ func get_points(camera: Camera, object3d: Cel3DObject) -> void: for vertex in arrays[ArrayMesh.ARRAY_VERTEX]: var x_vertex: Vector3 = object3d.transform.xform(vertex) var point := camera.unproject_position(x_vertex) - points.append(point) + if not camera.is_position_behind(x_vertex): + points.append(point) points_per_object[object3d] = points if object3d.selected: gizmos_origin = camera.unproject_position(object3d.translation)