A team game with an emphasis on movement (with no shooting), inspired by Overwatch and Zineth
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
484 B

  1. extends Label
  2. var camera
  3. var pos
  4. func _ready():
  5. pos = get_node("../NamePosition")
  6. func _process(delta):
  7. if not camera:
  8. # This needs to happen here because players are added later
  9. camera = get_node("/root/Level/Players/%d" % get_tree().get_network_unique_id()).get_node("TPCamera/Camera")
  10. var size = get_size()
  11. var offset = Vector2(size.x/2, size.y) # Origin at bottom
  12. var pos3d = pos.get_global_transform().origin
  13. set_position(camera.unproject_position(pos3d) - offset)