Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  how to get control point coordinate
#1
Hi,there
I made a rope use blueprint to set it's shape,and i move it position in runtime。
So,is there any method can let me get the new position coordinates of those control points(i set those control point when i set blueprint)in scripting?
I want control points position not particles position,could you help me?
Reply
#2
(21-12-2020, 10:49 AM)FZMv587 Wrote: Hi,there
I made a rope use blueprint to set it's shape,and i move it position in runtime。
So,is there any method can let me get the new position coordinates of those control points(i set those control point when i set blueprint)in scripting?
I want control points position not particles position,could you help me?

"Control points" are an editor-only concept, they don't exist at runtime, as you can't edit the rope's rest shape outside of the editor. The simulation only  knows about particles.

However, a particle group is created for each control point, that contains the index of the particle at that control point. You can look up the index of that particle and then set its position using the particle API:  http://obi.virtualmethodstudio.com/tutor...icles.html

For instance, to get the particle index for the first group:

Code:
var group = rope.blueprint.groups[0];
int index = group.particleIndices[0];
Reply