1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00

[3D cels] Do not display the object outline if it's behind the camera

This commit is contained in:
Emmanouil Papadeas 2023-05-08 17:40:11 +03:00
parent aa47133f9f
commit 5436298947

View file

@ -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)