diff --git a/main.gd b/main.gd index c0001d3..908e8bc 100644 --- a/main.gd +++ b/main.gd @@ -40,7 +40,7 @@ func git(args, splitlines = false): var output = [] var a = args.split(" ") a.insert(0, "-C") - a.insert(1, "/home/seb/tmp/godotgit") + a.insert(1, "/home/seb/wip/wurst-day-ever") #print ("Running: ", a) OS.execute("git", a, true, output, true) var o = output[0] diff --git a/node.gd b/node.gd index d3082c7..bd3629f 100644 --- a/node.gd +++ b/node.gd @@ -12,7 +12,13 @@ func _ready(): pass func _process(delta): - pass + for c in children: + var other = get_node("..").objects[c] + var d = other.position.distance_to(position) + var dir = (other.position - position).normalized() + var f = ((d-400)*0.01) + position += dir*f + other.position -= dir*f func id_set(new_id): id = new_id