Skip to content

Commit

Permalink
perf: naive hlod on piece mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
florianvazelle committed Sep 7, 2023
1 parent ca4e1ad commit 9743ded
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/race.gd
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ func generate_chunk():

func place_piece(piece_index: int) -> void:
var piece_data = PieceList.PIECES[piece_index]
var piece = piece_data[&"resource"].instantiate()
var piece: Node = piece_data[&"resource"].instantiate()

# naive hlod
for child in piece.get_children():
if child is MeshInstance3D:
child.visibility_range_end = 150

# Add the piece to the main Node
add_child(piece)
Expand Down

0 comments on commit 9743ded

Please sign in to comment.