player controller logic

This commit is contained in:
bee
2026-07-07 11:53:39 +02:00
parent b4f6dda29b
commit a40d0bfdd3
10 changed files with 93 additions and 25 deletions
+2 -1
View File
@@ -5,7 +5,6 @@ extends Node
## recenters scenery in the follow_focus group, and shifts the origin
## (teleporting the shift_with_origin group) before float precision degrades.
@export var focus: Node3D # the boat
@export var ocean: Ocean
## Distance from origin that triggers an origin shift.
@export var shift_threshold := 2048.0
@@ -16,6 +15,8 @@ extends Node
## True world position of the current local origin (grows over a long voyage).
var origin_offset := Vector3.ZERO
var focus: Node3D # Controlled by PlayerController
func true_position(node: Node3D) -> Vector3:
return node.global_position + origin_offset