-
Notifications
You must be signed in to change notification settings - Fork 110
Added free tangents and Spline.SplitAtTime method #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| SplineNode newNode = new SplineNode(selection.Direction, selection.Direction + selection.Direction - selection.Position); | ||
| var index = spline.nodes.IndexOf(selection); | ||
| if (index == spline.nodes.Count - 1) | ||
| { | ||
| spline.AddNode(newNode); | ||
| } | ||
| else | ||
| { | ||
| spline.InsertNode(index + 1, newNode); | ||
| } | ||
| selection = newNode; | ||
| serializedObject.Update(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the original code It was commented by mistake when testing the new method.
this commit restores it
| spline.SplitAtTime(5.25f); | ||
|
|
||
| //SplineNode newNode = new SplineNode(selection.Direction, selection.Direction + selection.Direction - selection.Position); | ||
| //var index = spline.nodes.IndexOf(selection); | ||
| //if (index == spline.nodes.Count - 1) | ||
| //{ | ||
| // spline.AddNode(newNode); | ||
| //} | ||
| //else | ||
| //{ | ||
| // spline.InsertNode(index + 1, newNode); | ||
| //} | ||
| //selection = newNode; | ||
| //serializedObject.Update(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was a wrong commit, the code is restored in 4f6b3b1
|
When will this be added to the asset? |
SplineNode
added tangentType enum to define how the direction behaves
added two new fields directionIn, directionOut. (should be tangentIn / tangentOut, but kept old naming convention to avoid confusion)
CubicBezierCurve
Spline
SplineEditor