Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edit control points properties from script
#1
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 :



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 ?
Reply


Messages In This Thread
Edit control points properties from script - by lufydad - 10-12-2021, 04:39 PM