feat: stream chunks in-game, render 3D catalog props, and ground chunk coordinates
checkpoint / checkpoint (push) Successful in 5m54s
checkpoint / checkpoint (push) Successful in 5m54s
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user