Skip to content

Commit

Permalink
Release v2.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Sir Victor committed Sep 15, 2021
1 parent f0df6ad commit b737b75
Show file tree
Hide file tree
Showing 75 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion Runtime/BezierSpline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,14 @@ public void GetEvenlySpacedPoints(float spacing, SplinePath bezierPath, float pr
parametersT.Add(0f);

var lastRotationAxis = (FlipNormals ? -1 : 1) * Vector3.forward;
var normalVector = Vector3.Cross(lastRotationAxis, tangents[0]).normalized;

var normalVector = Vector3.Cross(lastRotationAxis, tangents[0]).normalized;

if (normalVector == Vector3.zero) {
lastRotationAxis = (FlipNormals ? -1 : 1) * Vector3.left;
normalVector = Vector3.Cross(lastRotationAxis, tangents[0]).normalized;
}

var rotatedNormalVector = GetRotatedNormal(normalVector, 0f);
normals.Add(rotatedNormalVector);
for (var i = 1; i < segmentsCount || t < 1; i++)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.vvrvvd.spline-editor",
"version": "2.2.3",
"version": "2.2.4",
"displayName": "Spline Editor",
"description": "Unity Spline Editor is an open-source tool for creating and managing cubic bezier curves in Unity Editor. The tool let you do the basic operations like adding, removing or splitting curves but also provides you with option to factor, simplify, edit normals, draw or cast splines to camera view. You can also adjust how splines are displayed in the editor through settings window.",
"dependencies":
Expand All @@ -18,11 +18,11 @@
{
"displayName": "Mesh Generator",
"description": "Generating simple flat meshes based on BezierSpline.",
"path": "Samples/Mesh Generator"
"path": "Samples~/Mesh Generator"
},
{
"displayName": "Line Renderer Spline",
"description": "Using Line Renderer component for visualizing BezierSpline in the runtime.",
"path": "Samples/Line Renderer"
"path": "Samples~/Line Renderer"
}]
}

0 comments on commit b737b75

Please sign in to comment.