Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Add force to particle
#2
Don't pass an element index to the solver arrays, as elements != particles. This won't work if there is more than one actor in the solver, and won't work in the general case of resized/torn ropes. If it worked before, it's just luck.

Rope elements contain the indices of both particles at its ends, you should be able to use that.

Code:
solver.externalForces[element.particle1] = <your force>;
solver.externalForces[element.particle2] = <your force>;
Reply


Messages In This Thread
Add force to particle - by flaurens - 05-10-2020, 01:00 PM
RE: Add force to particle - by josemendez - 05-10-2020, 01:07 PM