fix
This commit is contained in:
@@ -257,6 +257,7 @@ func _ready() -> void:
|
|||||||
_position_camera_over_world()
|
_position_camera_over_world()
|
||||||
|
|
||||||
set_process(true)
|
set_process(true)
|
||||||
|
call_deferred("_refresh_streaming_targets_after_ready")
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
@@ -607,6 +608,15 @@ func _refresh_streaming_targets(force: bool) -> void:
|
|||||||
_refresh_streaming_targets_at(camera.global_position, force)
|
_refresh_streaming_targets_at(camera.global_position, force)
|
||||||
|
|
||||||
|
|
||||||
|
func _refresh_streaming_targets_after_ready() -> void:
|
||||||
|
var camera := _get_stream_camera()
|
||||||
|
if camera == null:
|
||||||
|
return
|
||||||
|
_terrain_root.position = Vector3.ZERO
|
||||||
|
_has_refresh_focus = false
|
||||||
|
_refresh_streaming_targets_at(camera.global_position, false)
|
||||||
|
|
||||||
|
|
||||||
## Core streaming update — works for both game (camera pos) and editor (preview center pos).
|
## Core streaming update — works for both game (camera pos) and editor (preview center pos).
|
||||||
func _refresh_editor_streaming_targets_at(focus_pos: Vector3, force: bool) -> void:
|
func _refresh_editor_streaming_targets_at(focus_pos: Vector3, force: bool) -> void:
|
||||||
if not force and not _should_refresh_focus(focus_pos):
|
if not force and not _should_refresh_focus(focus_pos):
|
||||||
@@ -2053,6 +2063,7 @@ func _finalize_loaded_tile(request: Dictionary, data: Dictionary) -> void:
|
|||||||
state["desired_tile_lod"] = -1 if not state["desired_lods"].is_empty() else _compute_desired_tile_lod(state, _last_focus_pos)
|
state["desired_tile_lod"] = -1 if not state["desired_lods"].is_empty() else _compute_desired_tile_lod(state, _last_focus_pos)
|
||||||
state["desired_tile_lod_visible"] = _compute_desired_tile_lod_visible(state, _last_focus_pos)
|
state["desired_tile_lod_visible"] = _compute_desired_tile_lod_visible(state, _last_focus_pos)
|
||||||
_tile_states[key] = state
|
_tile_states[key] = state
|
||||||
|
state = _sync_terrain_quality(state, _last_focus_pos)
|
||||||
state = _sync_detail_assets(state, _last_focus_pos)
|
state = _sync_detail_assets(state, _last_focus_pos)
|
||||||
_tile_states[key] = state
|
_tile_states[key] = state
|
||||||
_rebuild_chunk_queues()
|
_rebuild_chunk_queues()
|
||||||
@@ -2199,6 +2210,7 @@ func _finalize_loaded_streaming_tile(request: Dictionary, stream_tile: Resource)
|
|||||||
state["desired_tile_lod"] = _compute_desired_tile_lod(state, _last_focus_pos)
|
state["desired_tile_lod"] = _compute_desired_tile_lod(state, _last_focus_pos)
|
||||||
state["desired_tile_lod_visible"] = _compute_desired_tile_lod_visible(state, _last_focus_pos)
|
state["desired_tile_lod_visible"] = _compute_desired_tile_lod_visible(state, _last_focus_pos)
|
||||||
_tile_states[key] = state
|
_tile_states[key] = state
|
||||||
|
state = _sync_terrain_quality(state, _last_focus_pos)
|
||||||
state = _sync_detail_assets(state, _last_focus_pos)
|
state = _sync_detail_assets(state, _last_focus_pos)
|
||||||
_tile_states[key] = state
|
_tile_states[key] = state
|
||||||
_rebuild_chunk_queues()
|
_rebuild_chunk_queues()
|
||||||
|
|||||||
Reference in New Issue
Block a user