From 297f180ba88f942f57816c846bac5b6adc184568 Mon Sep 17 00:00:00 2001 From: Pavel Shestakov <0xShestakov@gmail.com> Date: Fri, 27 Mar 2026 13:58:39 +0300 Subject: [PATCH] fix: avoid to calculate global up direction for XYZ space --- Assets/PathCreator/Core/Runtime/Objects/VertexPath.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/PathCreator/Core/Runtime/Objects/VertexPath.cs b/Assets/PathCreator/Core/Runtime/Objects/VertexPath.cs index fb63fb8..e051487 100644 --- a/Assets/PathCreator/Core/Runtime/Objects/VertexPath.cs +++ b/Assets/PathCreator/Core/Runtime/Objects/VertexPath.cs @@ -71,7 +71,7 @@ public VertexPath (BezierPath bezierPath, Transform transform, float vertexSpaci bounds = new Bounds ((pathSplitData.minMax.Min + pathSplitData.minMax.Max) / 2, pathSplitData.minMax.Max - pathSplitData.minMax.Min); // Figure out up direction for path - up = (bounds.size.z > bounds.size.y) ? Vector3.up : -Vector3.forward; + up = space == PathSpace.xyz ? Vector3.up : (bounds.size.z > bounds.size.y) ? Vector3.up : -Vector3.forward; Vector3 lastRotationAxis = up; // Loop through the data and assign to arrays.