Closed ShockWave2048 closed 4 years ago
Hi! You can set point's interpolation mode (Absent/BezierIndependent/BezierSymmetrical) when you create a point, like so:
for (var i = 0; i < 3; i++)
{
var controlSecond = Vector3.right;
curve.AddPoint(new BGCurvePoint(curve, Vector3.forward * i, BGCurvePoint.ControlTypeEnum.BezierSymmetrical, -controlSecond, controlSecond));
}
Alternatively, iterate over points and change their mode if current mode==Absent:
for (var i = 0; i < curve.PointsCount; i++)
{
var point = curve[i];
if (point.ControlType == BGCurvePoint.ControlTypeEnum.Absent)
{
point.ControlType = BGCurvePoint.ControlTypeEnum.BezierSymmetrical;
point.ControlSecondLocal = Vector3.right;
}
}
Thanks very match! Will try today!
Hi! A just add in runtime (from script) simple points to curve with symmetry bezier type (and absent), it's have to crazy broken view - https://prnt.sc/t1i182 How can i convert this points curve to right smooth (symmetry bezier)? Thanks for answer!