Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope Reference from ObiParticlePicker
#1
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 ?
Reply
#2
(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
Reply
#3
(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 ?
thank you !
Reply