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.