fix: make non-walkable red blocks (Tile 4) invisible in 3D arenas
This commit is contained in:
+4
-4
@@ -177,17 +177,17 @@ func _instantiate_3d_arena(scene_path: String):
|
|||||||
|
|
||||||
func _hide_ground_tiles():
|
func _hide_ground_tiles():
|
||||||
# Make normal and auxiliary ground floors invisible
|
# Make normal and auxiliary ground floors invisible
|
||||||
# by shrinking their scale to 0. We EXCLUDE Item 4 (Wall) and 5 (Freeze)
|
# by shrinking their scale to 0. We also hide 4 (non-walkable red block)
|
||||||
# so they can still be seen above the 3D arena.
|
# as 3D arenas provide their own visual boundaries. We EXCLUDE 5 (Freeze).
|
||||||
var em = $EnhancedGridMap
|
var em = $EnhancedGridMap
|
||||||
if em and em.mesh_library:
|
if em and em.mesh_library:
|
||||||
var ml = em.mesh_library.duplicate()
|
var ml = em.mesh_library.duplicate()
|
||||||
for id in [0, 6]:
|
for id in [0, 4, 6]:
|
||||||
# Scale to 0 to hide it without triggering invalid mesh errors
|
# Scale to 0 to hide it without triggering invalid mesh errors
|
||||||
ml.set_item_mesh_transform(id, Transform3D().scaled(Vector3.ZERO))
|
ml.set_item_mesh_transform(id, Transform3D().scaled(Vector3.ZERO))
|
||||||
|
|
||||||
em.mesh_library = ml
|
em.mesh_library = ml
|
||||||
print("[Main] Hide tiles 0, 6 via zero-scale transform.")
|
print("[Main] Hide tiles 0, 4, 6 via zero-scale transform.")
|
||||||
|
|
||||||
func _setup_effect_elevation():
|
func _setup_effect_elevation():
|
||||||
var em = get_node_or_null("EnhancedGridMap")
|
var em = get_node_or_null("EnhancedGridMap")
|
||||||
|
|||||||
Reference in New Issue
Block a user