Fixed export/import lines curving through planet

This commit is contained in:
Anuken
2021-08-09 09:59:49 -04:00
parent 5b27f4786d
commit 42486cd784
2 changed files with 5 additions and 3 deletions

View File

@@ -215,8 +215,10 @@ public class PlanetRenderer implements Disposable{
}
public void drawArc(Planet planet, Vec3 a, Vec3 b, Color from, Color to, float length, float timeScale, int pointCount){
float dot = 1f - (Tmp.v32.set(a).nor().dot(Tmp.v33.set(b).nor()) + 1f)/2f;
Vec3 avg = Tmp.v31.set(b).add(a).scl(0.5f);
avg.setLength(planet.radius*(1f+length));
avg.setLength(planet.radius*(1f+length) + dot * 1.3f);
points.clear();
points.addAll(Tmp.v33.set(b).setLength(outlineRad), Tmp.v31, Tmp.v34.set(a).setLength(outlineRad));