10-12-2021, 04:39 PM
Hi!
I'm trying to create a rope from script that can be edited in runtime. Therefore, I need to add and edit control points in a blueprint in runtime. I found how to add control points with AddControlPoint(), but the only way I found to edit properties of a given control point in runtime, is by deleting all control points with this :
And re-add control points with the new properties. However, I think this method is neither efficient, nor clean.
Is there another way to do it ?
I'm trying to create a rope from script that can be edited in runtime. Therefore, I need to add and edit control points in a blueprint in runtime. I found how to add control points with AddControlPoint(), but the only way I found to edit properties of a given control point in runtime, is by deleting all control points with this :
Code:
int nbrControlPoint = _blueprint.path.ControlPointCount - 1;
for (int i = nbrControlPoint; i >= 0; i--)
{
_blueprint.path.RemoveControlPoint(i);
}
And re-add control points with the new properties. However, I think this method is neither efficient, nor clean.
Is there another way to do it ?