Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to add force to specific particles on a rope?
#1
Is it possible to add force to specific particles on a rope? For example I have a rope which the head and tail is fixed ( by using ObiParticleAttachment) , and I want the middle part of the rope can bounce by specific force. Not sure is it possible because I can't find the related API.  Or  can we use the  pin constrains to reach a similar effect ?
Reply
#2
(06-06-2020, 10:15 PM)wenzy Wrote: Is it possible to add force to specific particles on a rope? For example I have a rope which the head and tail is fixed ( by using ObiParticleAttachment) , and I want the middle part of the rope can bounce by specific force. Not sure is it possible because I can't find the related API.  Or  can we use the  pin constrains to reach a similar effect ?

Hi Wenzy,

Yes, you can add external forces to specific particles. The solver has a "externalForces" array, just like int has "positions", "velocities", etc. Each entry in the array is the external force applied to that particle.

You can find all available per-particle arrays in the API docs for the ObiSolver class.

You can take the ObiAmbientForceZone class as reference on how to set external forces.
Reply