Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to swing the rope correct?
#1
So my player can grap the rope where he want. 
I want to use the left/right cursors to add velocity to the rope to swing it left, right. 

What is the correct way to do this? 
If I add left or right velocity to the current, or all particles than the rope movement will be not right. 
I mean I have rope and I have chain from metal what is heavy, but the rope not moving correctly. Correct means that the all particle stay in 1 line only. So not flexible at all.

1, how can move all the particle?
2, how can remove the flexibility of the rope, so I want a hard rope
Reply
#2
(18-03-2023, 04:28 PM)lacasrac Wrote: I mean I have rope and I have chain from metal what is heavy, but the rope not moving correctly. Correct means that the all particle stay in 1 line only. So not flexible at all.

Hi!

That's not correct at all, in the sense that no rope/chain in the real world moves keeping a straight line. That's only the case for rigidbodies (eg. steel bars).

(18-03-2023, 04:28 PM)lacasrac Wrote: 1, how can move all the particle?

You can iterate trough all particles in the rope and move them all if you wish, by using the particles API:
http://obi.virtualmethodstudio.com/manua...icles.html

However I don't recommend doing that at all if you're looking for something that resembles a pendulum, only one particle (the one at the top of the pendulum) should be explicitly moved around.

(18-03-2023, 04:28 PM)lacasrac Wrote: 2, how can remove the flexibility of the rope, so I want a hard rope

Just use more substeps/iterations. The manual contains an in-depth explanation of how the simulation works internally and how iterations/substeps affect convergence speed and simulation quality: http://obi.virtualmethodstudio.com/manua...gence.html

I'd start by using 10-12 substeps (you can find this setting in the ObiFixedUpdater component) and a couple distance constraint iterations (all constraint iterations are found in the ObiSolver component).

kind regards
Reply