Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copy ropes in play mode
#4
Yes, solver.positions contains particle data for all ropes in the solver. However each rope has an “elements” array, each entry in this array contains two indices into solver.positions that you can use to retrieve the correct position data for particles in a specific rope, in the same order they appear in the rope. See the link in my previous message:
http://obi.virtualmethodstudio.com/manua...ropes.html

The easiest way to add new particles is to use a cursor. Cursors will add as many particles as needed to reach a specific length in a single frame, however they won’t set the position of said particles - hence the “jerk” as the simulation takes over and moves the newly added particles in the following frames. However you will be immediately copying particle positions over from another rope as soon as the cursor creates them, so there should not be any jerks/sudden motion. (See the GrapplingHook sample scene for an example of using a cursor in a similar way)

Tomorrow morning I will whip up an example of this to help you out.

Kind regards,
Reply


Messages In This Thread
Copy ropes in play mode - by Alexander34 - 08-01-2024, 03:53 PM
RE: Copy ropes in play mode - by josemendez - 16-01-2024, 08:41 AM
RE: Copy ropes in play mode - by Alexander34 - 16-01-2024, 02:47 PM
RE: Copy ropes in play mode - by josemendez - 16-01-2024, 07:42 PM
RE: Copy ropes in play mode - by Alexander34 - 16-01-2024, 08:08 PM
RE: Copy ropes in play mode - by josemendez - 17-01-2024, 11:08 AM