Obi Official Forum
How to swing the rope correct? - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: How to swing the rope correct? (/thread-3811.html)



How to swing the rope correct? - lacasrac - 18-03-2023

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


RE: How to swing the rope correct? - josemendez - 19-03-2023

(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/manual/6.3/scriptingparticles.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/manual/6.3/convergence.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