From c0dc321d35d45219721a52f1fb3ce18ee1984310 Mon Sep 17 00:00:00 2001 From: Seb James Date: Mon, 20 Oct 2025 16:27:08 +0100 Subject: [PATCH] Fix order of translate and rotate to ensure rotation occurs first --- mplot/VisualTextModelImplMX.h | 2 +- mplot/VisualTextModelImplNoMX.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mplot/VisualTextModelImplMX.h b/mplot/VisualTextModelImplMX.h index 16467a27..1bdd2fb9 100644 --- a/mplot/VisualTextModelImplMX.h +++ b/mplot/VisualTextModelImplMX.h @@ -159,8 +159,8 @@ namespace mplot { const sm::quaternion& _rotation, const sm::vec _offset, std::array _clr = {0,0,0}) { - this->viewmatrix.rotate (_rotation); this->viewmatrix.translate (_offset); + this->viewmatrix.rotate (_rotation); this->clr_text = _clr; this->setupText (_txt); } diff --git a/mplot/VisualTextModelImplNoMX.h b/mplot/VisualTextModelImplNoMX.h index 1a27e6e8..f7b2ca0c 100644 --- a/mplot/VisualTextModelImplNoMX.h +++ b/mplot/VisualTextModelImplNoMX.h @@ -152,8 +152,8 @@ namespace mplot { const sm::quaternion& _rotation, const sm::vec _offset, std::array _clr = {0,0,0}) { - this->viewmatrix.rotate (_rotation); this->viewmatrix.translate (_offset); + this->viewmatrix.rotate (_rotation); this->clr_text = _clr; this->setupText (_txt); }