From a9d7c6d1453bba12d18e8bc895687e5b70ff0494 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 28 May 2025 17:42:41 +0200 Subject: [PATCH] Unity thing orientation is updated, but not correct yet --- Unity/SiteServer.cs | 2 ++ Unity/Thing.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/Unity/SiteServer.cs b/Unity/SiteServer.cs index c067844..24205c7 100644 --- a/Unity/SiteServer.cs +++ b/Unity/SiteServer.cs @@ -42,6 +42,8 @@ namespace RoboidControl.Unity { Participant participant = remoteParticipant.AddComponent(); participant.coreParticipant = e.participant; participant.coreParticipant.component = participant; + participant.ipAddress = e.participant.ipAddress; + participant.port = e.participant.port; break; case ThingMsg.id: HandleThingEvent(e); diff --git a/Unity/Thing.cs b/Unity/Thing.cs index 326aa7c..575b72a 100644 --- a/Unity/Thing.cs +++ b/Unity/Thing.cs @@ -260,6 +260,7 @@ namespace RoboidControl.Unity { /// This can update the position and/or orientation when the velocity of the thing is zero. /// If a velocity is not zero, the position and/or orientation update will be ignored protected virtual void HandlePose() { + this.transform.localRotation = core.orientation.ToQuaternion(); if (core.linearVelocity.distance == 0) this.transform.localPosition = core.position.ToVector3(); if (core.angularVelocity.distance == 0)