Handle Depth In Mesh Generation
This commit is contained in:
@@ -64,7 +64,7 @@ func _func_godot_apply_properties(entity_properties: Dictionary) -> void:
|
||||
depth_min = d
|
||||
depth = -(abs(depth_min) + abs(depth_max))
|
||||
|
||||
depth_position_offset = -(Vector3.BACK * (depth/2))
|
||||
depth_position_offset = Vector3.BACK * (depth/2)
|
||||
elif extrusion_direction == ExtrudeDirection.RIGHT:
|
||||
for vert in verticies:
|
||||
verts_2d.append(Vector2(vert.z, vert.y))
|
||||
@@ -90,7 +90,7 @@ func _func_godot_apply_properties(entity_properties: Dictionary) -> void:
|
||||
depth_min = d
|
||||
depth = -(abs(depth_min) + abs(depth_max))
|
||||
|
||||
depth_position_offset = (Vector3.UP * (depth/2))
|
||||
depth_position_offset = Vector3.UP * (depth/2)
|
||||
|
||||
var outer_boudary = Geometry2D.convex_hull(verts_2d)
|
||||
verts2d = outer_boudary
|
||||
|
||||
@@ -31,7 +31,7 @@ func _init(vector_indexes: PackedInt32Array, vector_points: PackedVector2Array,
|
||||
elif extrude_direction == DestructableWall.ExtrudeDirection.RIGHT:
|
||||
for point in vector_points:
|
||||
self._v_points.append(Vector3(0, point.y, point.x))
|
||||
depth_vector = -Vector3.RIGHT * depth
|
||||
depth_vector = Vector3.LEFT * depth
|
||||
elif extrude_direction == DestructableWall.ExtrudeDirection.UP:
|
||||
for point in vector_points:
|
||||
self._v_points.append(Vector3(point.x, 0, point.y))
|
||||
|
||||
Reference in New Issue
Block a user