01-14-2019, 10:24 PM
Hi,
I don't have the answer to this right now. Aligning the orientations is definitely possible, so I need to see how things were done in the InfiniteTrack example and fix it.
(01-14-2019, 04:39 PM)geekrelief Wrote: Why aren't the generated meshes orientations aligned in the InifiniteTrack example?
I don't have the answer to this right now. Aligning the orientations is definitely possible, so I need to see how things were done in the InfiniteTrack example and fix it.
(01-14-2019, 04:39 PM)geekrelief Wrote: Is there an API available to calculate the TNB frame for the last point of one spline and have that as input into the next spline i.e. parallel transport so everything is smooth?Yes there is:
- To get the tangent: yourSpline.GetTangent(1) or yourSpline.GetTangentFast(1);
- To get the normal: yourSpline.GetOrientationUpFast(1);
- To get the binormal, no API method does this, but you can easily compute it (cross product of tangent and normal)
- To set the tangent and normal at the start of a spline, just update the orientation of your spline's first control point: yourSpline.ControlPointsList[0].SetRotation(theNewRotation)
- You can avoid doing all this by using the synchronization options of Connections: https://curvyeditor.com/documentation/splines/connections . By connecting the last of first control points of two splines, and setting the rotation synchronization, rotating one of them will rotate the other accordingly. The corresponding class in the API is CurvyConnection.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.