Help how to get control point coordinate - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Help how to get control point coordinate (/thread-2652.html) |
how to get control point coordinate - FZMv587 - 21-12-2020 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? RE: how to get control point coordinate - josemendez - 21-12-2020 (21-12-2020, 10:49 AM)FZMv587 Wrote: Hi,there "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/tutorials/scriptingparticles.html For instance, to get the particle index for the first group: Code: var group = rope.blueprint.groups[0]; |