This commit is contained in:
bee
2026-07-07 10:01:56 +02:00
parent 2e28afebce
commit e946b43db7
13 changed files with 140 additions and 63 deletions
+4
View File
@@ -22,6 +22,8 @@ func true_position(node: Node3D) -> Vector3:
func _physics_process(_delta: float) -> void:
if focus == null:
return
_maybe_shift_origin()
_recenter_followers()
@@ -34,6 +36,7 @@ func _maybe_shift_origin() -> void:
origin_offset += shift
for node in get_tree().get_nodes_in_group("shift_with_origin"):
node.global_position -= shift
node.reset_physics_interpolation()
ocean.shift_origin(shift)
@@ -45,3 +48,4 @@ func _recenter_followers() -> void:
if new_x != node.global_position.x or new_z != node.global_position.z:
node.global_position.x = new_x
node.global_position.z = new_z
node.reset_physics_interpolation()