Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Indexing Particles while using Obi Rope Cursor
#1
Once a cursor is added to a rope (and the length is altered) it looks like the index of the particles no longer returns in a nice order using the below method:

Code:
// first particle in the rope is the first particle of the first element:
int firstParticle = rope.elements[0].particle1;

// last particle in the rope is the second particle of the last element:
int lastParticle = rope.elements[rope.elements.Count-1].particle2;

// now get their positions (expressed in solver space):
var firstPos = rope.solver.positions[firstParticle];
var lastPos  = rope.solver.positions[lastParticle];

Instead, I have found I'll get the index of the first particle correct, and the last particle index will be at the first cursor spawn position, and then after that, I can't spy an order to the particles. 

I'm using two cursors both facing inward in case that context matters, though I've found the same issue with just one cursor in the crane demo scene also.

Any clues/advice from folks for how to get a nice ordered index of them?
Reply


Messages In This Thread
Indexing Particles while using Obi Rope Cursor - by MisterToot - 17-06-2024, 10:20 AM