22-09-2023, 10:15 AM
(22-09-2023, 09:46 AM)littleanchovy Wrote: Hello, i am using obi particle picker component to move my rope with mouse cursors, how can i get the picked rope reference from that component to use events like OnParticleDragged,OnParticleHeld ?
Given the index of the particle in the solver (which is passed to OnParticleDragged/Held), you can do:
Code:
ObiSolver.ParticleInActor pa = solver.particleToActor[particleIndex];
var rope = pa.actor as ObiRope;
See: http://obi.virtualmethodstudio.com/manua...icles.html