Thanks so much for your help!
I nearly got it working. I tried to use the ObiParticleHandle class to AddParticle() and RemoveParticle() the closest particle, but while that kind of works for a short amount of time it gets really weird when the Leap Motion hands lose tracking / go out of the field of view (which happens very frequently). I thought I would use ObiParticleHandle.RemoveParticle(), but I think calling it from OnDisable might be to late? Gotta try that tomorrow.
As far as I understand, I can't create a reference to the particle itself, but have to use the indices. As long as there is only one actor / cloth - are the indices of the particles reliable or is it possible that they change some time after I have cached e.g. the index of the nearest particle?
I nearly got it working. I tried to use the ObiParticleHandle class to AddParticle() and RemoveParticle() the closest particle, but while that kind of works for a short amount of time it gets really weird when the Leap Motion hands lose tracking / go out of the field of view (which happens very frequently). I thought I would use ObiParticleHandle.RemoveParticle(), but I think calling it from OnDisable might be to late? Gotta try that tomorrow.
As far as I understand, I can't create a reference to the particle itself, but have to use the indices. As long as there is only one actor / cloth - are the indices of the particles reliable or is it possible that they change some time after I have cached e.g. the index of the nearest particle?
@niZmo: That's super cool, I'm a big fan of VRTK! I looked at the code you posted, only could parse parts of it because it's so specifically for VRTK, and kind of complex ^^; ... but it helped me get a rough idea, thanks again.