M_Curve:GetControlPoints(segID, p1, p2, p3, p4, forDrawing)

Version added: before 9.5
Returns the control points for the given segment id

Arguments:

Name Type Description Default Ver
segID int32 the segment in the curve (the id of the first segemnt is zero) < 9.5
p1 Vector2 the location of the start of the segment < 9.5
p2 Vector2 the position of the control point that controls the curvature of the segement from p1 < 9.5
p3 Vector2 the position of the control point that controls the curvature of the segement to p4 < 9.5
p4 Vector2 the location of the end of the segment < 9.5
forDrawing bool false < 9.5

Return value:

void
Curves created in Anime Studio 7 and later, curves are defined by a cubic Bézier function.

(Curves created in Moho 6 and earlier use a different 'legacy curve' algorithm.)

M_Curve:GetControlPoints() returns the four points P1, P2, P3 and P4 to define the path between the two mesh points that define a segment of the curve.

The curve segment starts at P1 (where there is a mesh point) going toward P2 and arrives at P4 (where there is another mesh point) coming from the direction of P3. P2 and P3 are only there to provide directional information.

Search results

Usage of 'GetControlPoints' is found in the following scripts:

<< Back to M_Curve