From 2dbd96488110e3146d1abf9e495a560348f8be9a Mon Sep 17 00:00:00 2001 From: Seb James Date: Fri, 30 Jan 2026 14:54:50 +0000 Subject: [PATCH] Fixes an error Seb introduced with #117 --- mplot/NavMesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mplot/NavMesh.h b/mplot/NavMesh.h index ceea4d6c..5b2aaedb 100644 --- a/mplot/NavMesh.h +++ b/mplot/NavMesh.h @@ -1306,7 +1306,7 @@ namespace mplot // Compute the reorientation due to the requested movement. float rotn_angle = 0.0f; // Rotate by the angle between the normals (if stabilised is false). I think this is constrained to be <= pi - if (stabilised == false) { this->tn0.angle (_tn, cd.tri_edge); } + if (stabilised == false) { rotn_angle = this->tn0.angle (_tn, cd.tri_edge); } // If tn0 and _tn are identical, then rotn_angle will be NaN, but in that case we want no rotation if (std::isnan (rotn_angle)) { rotn_angle = 0.0f; } sm::mat reorient_model; // reorientation transformation in sf