diff --git a/interfaces/hud/hud.tscn b/interfaces/hud/hud.tscn index 55bda85..d8f14b2 100644 --- a/interfaces/hud/hud.tscn +++ b/interfaces/hud/hud.tscn @@ -39,10 +39,15 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(_delta : float) -> void: + + var velocity_xz : Vector3 = player.linear_velocity + velocity_xz.y = 0 + text = \"\" text += \"fps: %s\\n\" % str(Engine.get_frames_per_second()) text += \"position: %d, %d, %d\\n\" % [player.position.x, player.position.y, player.position.z] - text += \"speed: %d km/h\\n\" % (player.linear_velocity.length() * 3.6) + text += \"speed: %d km/h\\n\" % (player.linear_velocity.length() * 3.6) + text += \"speed_xz: %d km/h\\n\" % (velocity_xz.length() * 3.6) " [sub_resource type="Shader" id="Shader_gaah5"]