From 3726070f023dc3ecfdc36798ea077d3cb08ff8da Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Tue, 5 Nov 2024 14:55:04 +0100 Subject: [PATCH] Model scale support --- NetworkSync.cpp | 2 +- Thing.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NetworkSync.cpp b/NetworkSync.cpp index bed2c2d..dc45925 100644 --- a/NetworkSync.cpp +++ b/NetworkSync.cpp @@ -143,7 +143,7 @@ void NetworkSync::SendModel(Roboid *roboid) { buffer[ix++] = 0x00; // objectId Spherical16 s = Spherical16::zero; //(roboid->modelPosition); SendSpherical16(buffer, &ix, s); - SendFloat16(buffer, &ix, 1); // roboid->modelScale); + SendFloat16(buffer, &ix, roboid->modelScale); buffer[ix++] = len; for (int urlIx = 0; urlIx < len; urlIx++) diff --git a/Thing.h b/Thing.h index 9211945..a426315 100644 --- a/Thing.h +++ b/Thing.h @@ -96,6 +96,7 @@ public: unsigned char childCount = 0; const char *modelUrl = nullptr; + float modelScale = 1; protected: /// @brief Bitmask for Motor type