I have created a bezier curve using the PIXI.Graphics function bezierCurveTo()
The bezier curve end points are attached (or at least look like they are attached) to other sprites that can be dragged around the root container. When these sprites are dragged, the bezier curve remains in place.
Is it possible to dynamically change/update the points of a bezier curve, including the control points?
Hi @KosGrillis , this should be possible by calling, clearing the graphics object and redrawing the bezier curve each frame with the new control points.
render()
{
myCurve.clear();
myCurve.moveTo(x, y);
myCurve. bezierCurveTo(cx, cy, cx2, cy2, newX, newY);
renderer.render(scene)
}
hope that helps! Thanks!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi @KosGrillis , this should be possible by calling, clearing the graphics object and redrawing the bezier curve each frame with the new control points.
hope that helps! Thanks!