From 86ff02a1100cc0f5f4dd2d335716e0f6678caf96 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Tue, 18 Feb 2025 15:05:07 +0100 Subject: [PATCH] Working ants --- Unity/SiteServer.cs | 5 ++--- Unity/TouchSensor.cs | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Unity/SiteServer.cs b/Unity/SiteServer.cs index 6431eb3..f809360 100644 --- a/Unity/SiteServer.cs +++ b/Unity/SiteServer.cs @@ -28,9 +28,8 @@ namespace Passer.Control.Unity { protected virtual void Update() { site.Update((ulong)(Time.time * 1000)); - if (thingQueue.TryDequeue(out Core.Thing thing)) { - thing.CreateComponent(); - } + while (thingQueue.TryDequeue(out Core.Thing thing)) + thing.CreateComponent(); } } diff --git a/Unity/TouchSensor.cs b/Unity/TouchSensor.cs index 4cf41b8..a666f6b 100644 --- a/Unity/TouchSensor.cs +++ b/Unity/TouchSensor.cs @@ -40,7 +40,10 @@ namespace Passer.Control.Unity { private void OnTriggerEnter(Collider other) { if (other.isTrigger) return; - + if (this.transform.root == other.transform.root) + return; + + Debug.Log($"touched {other.gameObject.name}"); this.coreSensor.touchedSomething = true; } private void OnTriggerExit(Collider other) {