distance_readout.gd 394 B

12345678910111213141516171819
  1. extends Label
  2. # Declare member variables here. Examples:
  3. # var a = 2
  4. # var b = "text"
  5. # Called when the node enters the scene tree for the first time.
  6. func _ready():
  7. pass # Replace with function body.
  8. func _process(delta):
  9. text = "Distance: " + str($"../Sensor/RayCast".distance)
  10. # Called every frame. 'delta' is the elapsed time since the previous frame.
  11. #func _process(delta):
  12. # pass