Im drawing splines at runtime and apply splinemeshes to it. My Spline meshes consist von a start mesh, segment mesh and end mesh.
Start mesh: Point 0…1
Segment mesh: Point 1…2, 2…3, …, n-2…n-1
End mesh: Point n-1…n
When creating the spline, I drag at point n. if there are >=3 Spline points i add another point at point n-1 and draw a new spline mesh between n-2 (previous n-1) and n-1 (the new point). The mesh is getting set: mesh start loc/tan = n-2 loc/tan; mesh end loc/tan = n-1 loc/tan.
If I keep dragging on point n, point n-1 will follow point n and the new mesh is stretching.
Problem: The new mesh is hard deformed when point n-2 and point n-1 are to close together. Dragging further the mesh will become smooth as it should. The problem are the tangents at this spline points. Because of the distance from point n-3 to n-2 the tangent is long. The same for n-1 because of n. This long tangents on n-2 and n-1 make the shape between them hard deform. Setting the tangents at this points to a very low length, solves the problem for the new mesh, but causes problem with the other mesh attached to the specific point.
is it posible to set the tangent of a spline point only on one side? Like in Blender on a curve:
Or any other idea to get rid of that?