feat: stream chunks in-game, render 3D catalog props, and ground chunk coordinates
checkpoint / checkpoint (push) Successful in 5m54s

This commit is contained in:
2026-09-16 21:31:33 +00:00
parent e54ff6eeb2
commit d2b62c5d25
5 changed files with 412 additions and 56 deletions
+4 -9
View File
@@ -74,17 +74,12 @@ func _create_mesh_for_tile(tile_def: TileDef) -> void:
_mesh_instances[tile_def.id] = mesh_instance
## Convert a tile grid coordinate to a world-space position (center of tile).
## Convert a tile grid coordinate to a chunk-local 3D position (center of tile).
func _tile_to_world(x: int, y: int, z: int) -> Vector3:
var origin := Vector3(
chunk_coord.x * tile_layer.width,
chunk_coord.y * tile_layer.height,
chunk_coord.z * tile_layer.depth
)
return origin + Vector3(
return Vector3(
x * TILE_SIZE + TILE_SIZE * 0.5,
y * TILE_SIZE + TILE_SIZE * 0.5,
z * TILE_SIZE + TILE_SIZE * 0.5
z * TILE_SIZE + TILE_SIZE * 0.5,
y * TILE_SIZE + TILE_SIZE * 0.5
)