extends Label @export var boat: Boat # drag the Crate into this slot in the inspector @export var world: WorldManager func _process(_delta: float) -> void: if boat == null or world == null: text = "no boat" return var forward := -boat.global_basis.z forward.y = 0.0 var speed := boat.linear_velocity.dot(forward.normalized()) var pos := world.true_position(boat) text = "Throttle: %+.0f %% Speed: %.1f m/s Submerged: %.0f %% Position: (%.0f, %.0f) " % [ boat.throttle * 100.0, speed, boat.submerged_ratio * 100.0, pos.x, pos.z, ]