From e3e7485569e521c2e4192a785aa439cf70645a57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobias=20Sch=C3=B6ner?= <tobias.stonehead@gmail.com>
Date: Fri, 3 Jun 2022 13:25:07 +0200
Subject: [PATCH] Ring visualisation now always faces upwards

---
 Assets/Scripts/InteractionEngine/FactHandling/FactSpawner.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Assets/Scripts/InteractionEngine/FactHandling/FactSpawner.cs b/Assets/Scripts/InteractionEngine/FactHandling/FactSpawner.cs
index 44ec5398..cf3fb8ff 100644
--- a/Assets/Scripts/InteractionEngine/FactHandling/FactSpawner.cs
+++ b/Assets/Scripts/InteractionEngine/FactHandling/FactSpawner.cs
@@ -219,7 +219,10 @@ public Fact SpawnRing(Fact fact)
         ring.transform.position = middlePoint;
 
         //Rotate Ring according to normal
-        ring.transform.up = normal;
+        if (normal.y < 0) // if normal faces downwards use inverted normal instead
+            ring.transform.up = -normal;
+        else
+            ring.transform.up = normal;
 
         //Set radii
         foreach (var torus in tori)
-- 
GitLab