Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sticking cloth on object in VR
#5
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?

@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.
Reply


Messages In This Thread
Sticking cloth on object in VR - by mbbmbbmm - 16-10-2017, 02:56 AM
RE: Sticking cloth on object in VR - by niZmo - 19-10-2017, 12:51 AM
RE: Sticking cloth on object in VR - by mbbmbbmm - 19-10-2017, 01:26 AM
RE: Sticking cloth on object in VR - by mbbmbbmm - 22-10-2017, 11:47 PM
RE: Sticking cloth on object in VR - by niZmo - 23-10-2017, 01:43 AM
RE: Sticking cloth on object in VR - by mbbmbbmm - 23-10-2017, 06:57 AM
RE: Sticking cloth on object in VR - by mbbmbbmm - 25-10-2017, 07:08 PM