methusalah / SplineMesh

A Unity plugin to create curved content in real-time with bézier curves
https://twitter.com/dumas181
MIT License
1.05k stars 104 forks source link

SplineNode should have the property LocalDirection #55

Open MichaelMacha opened 2 years ago

MichaelMacha commented 2 years ago

When I hear "direction" when used to describe a vector, I anticipate an absolute vector pointing in the direction provided by its elements. So with SplineNode.Direction, I failed to realize that it requires a world coordinate.

Rather than changing this entirely and breaking previous code, adding an additional property for the same field, LocalDirection, which subtracts the position of the SplineNode and gives the direction in local space, could be handy. We would still only have one direction field, but two ways of accessing and changing it based on the context.