Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Fix particles at runtime?
#1
I've got a VR scene where a rope has one end fixed into a wall, and a user will grab the other end and move it around and plug it in to various objects in the scene.

The "wall" end of the rope has the first two particles fixed in place, and the "user" end has a pin constraint connected to a cylinder with a rigidbody/collider/VR-grabbable.

My goal is to take the last two particles on the "user" end of the rope and fix them in place when a user plugs it in, but I'm having trouble discerning if it's even possible. 

Is it possible to modify particles in this way at runtime? Is there a simpler solution that I'm simply not seeing?
Reply
#2
(06-04-2018, 06:45 PM)Schaeferyn Wrote: I've got a VR scene where a rope has one end fixed into a wall, and a user will grab the other end and move it around and plug it in to various objects in the scene.

The "wall" end of the rope has the first two particles fixed in place, and the "user" end has a pin constraint connected to a cylinder with a rigidbody/collider/VR-grabbable.

My goal is to take the last two particles on the "user" end of the rope and fix them in place when a user plugs it in, but I'm having trouble discerning if it's even possible. 

Is it possible to modify particles in this way at runtime? Is there a simpler solution that I'm simply not seeing?

Hi!

Fixing a particle is done by setting its inverse mass (and its velocity) to zero. You can do this at runtime by using particle getters/setters, see the last bit of:
http://obi.virtualmethodstudio.com/tutor...icles.html
Reply