Add starter RV progression and fishing feedback
This commit is contained in:
parent
eed361681a
commit
d8bf59bca0
47 changed files with 2268 additions and 467 deletions
|
|
@ -4414,6 +4414,19 @@ func chunk_position(coordinate: Vector2i) -> Vector3:
|
|||
)
|
||||
|
||||
|
||||
func coordinate_for_local_position(position: Vector3) -> Vector2i:
|
||||
if catalog == null or catalog.chunk_size <= 0.0:
|
||||
return Vector2i(-1, -1)
|
||||
var half_grid := Vector2(
|
||||
float(grid_size.x - 1) * 0.5,
|
||||
float(grid_size.y - 1) * 0.5,
|
||||
)
|
||||
return Vector2i(
|
||||
roundi(position.x / catalog.chunk_size + half_grid.x),
|
||||
roundi(position.z / catalog.chunk_size + half_grid.y),
|
||||
)
|
||||
|
||||
|
||||
func get_generated_chunks_root() -> Node3D:
|
||||
return _generated_chunks
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue