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:
parent
aa47133f9f
commit
5436298947
|
@ -96,7 +96,8 @@ func get_points(camera: Camera, object3d: Cel3DObject) -> void:
|
||||||
for vertex in arrays[ArrayMesh.ARRAY_VERTEX]:
|
for vertex in arrays[ArrayMesh.ARRAY_VERTEX]:
|
||||||
var x_vertex: Vector3 = object3d.transform.xform(vertex)
|
var x_vertex: Vector3 = object3d.transform.xform(vertex)
|
||||||
var point := camera.unproject_position(x_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
|
points_per_object[object3d] = points
|
||||||
if object3d.selected:
|
if object3d.selected:
|
||||||
gizmos_origin = camera.unproject_position(object3d.translation)
|
gizmos_origin = camera.unproject_position(object3d.translation)
|
||||||
|
|
Loading…
Reference in a new issue