This commit is contained in:
Anuken
2019-09-18 15:18:59 -04:00
parent 1e667946b3
commit 0d29d94800
4 changed files with 6 additions and 3 deletions
@@ -227,6 +227,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
float radScl = 1.5f;
for(Unit en : arr){
if(en.isFlying() != isFlying()) continue;
float dst = dst(en);
float scl = Mathf.clamp(1f - dst / (getSize()/(radScl*2f) + en.getSize()/(radScl*2f)));
moveVector.add(Tmp.v1.set((x - en.x) * scl, (y - en.y) * scl).limit(0.4f));