Skip to content

Commit

Permalink
fix bezier tangent calculation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okawa committed Jan 22, 2022
1 parent 50ada9a commit c18964b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public Vector3 GetPoint(float t) {

public Vector3 CalcBezierTangent(float t, float delta = 0.005f) {
var point = GetPoint(t);
var deltaPoint = GetPoint(t + delta);
var deltaPoint = GetPoint(Mathf.Clamp(t + delta, 0f, 1f));
var tangent = deltaPoint - point;
return tangent.normalized;
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Bg/WaypointSystemForTimeline/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.bg.waypointystemfortimeline",
"displayName": "WaypointSystemForTimeline",
"version": "1.0.2",
"version": "1.0.3",
"author": {
"name": "KyoheiOkawa"
}
Expand Down

0 comments on commit c18964b

Please sign in to comment.