Obi Official Forum
Throw my rope - 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: Throw my rope (/thread-3013.html)



Throw my rope - Yannig.S - 07-07-2021

Hello guys,

In my next game I would like to throw the rope, it is like a torus and is launched on the platform.

How can I do that please ?



RE: Throw my rope - josemendez - 08-07-2021

(07-07-2021, 05:48 PM)Yannig.S Wrote: Hello guys,

In my next game I would like to throw the rope, it is like a torus and is launched on the platform.

How can I do that please ?

Hi there!

Sorry but I don't understand your question.
- What do you mean by "throw the rope"? throw the entire rope as you would a rigid object? throw an object attached to the rope and the rope must follow (kinda like a fishing rod)?
- What do you mean by "it is like a torus"? Does this refer to the shape of the rope? should it be a closed, circular rope, like a ring?
- What do you mean by "launched on the platform"?

What have you tried so far to do what you're after? Can you share your setup/results?

kind regards,


RE: Throw my rope - Yannig.S - 08-07-2021

oh sorry if that wasn't very clear ...
I try to reproduce this game =>
[attachment=1084]


RE: Throw my rope - josemendez - 08-07-2021

(08-07-2021, 12:14 PM)Yannig.S Wrote: oh sorry if that wasn't very clear ...
I try to reproduce this game =>

Oh, ok!

Getting a closed, circular rope is easy: simply click the "open/closed" toggle in the path editor, and move your control points around to give it a circular shape. See:
http://obi.virtualmethodstudio.com/manual/6.2/ropesetup.html

Then, to launch it you can just use rope.AddForce() (behaves just like Unity's rigidbody.AddForce()) to launch your rope with a force of any direction/magnitude.

let me know if you need further help.

kind regards,


RE: Throw my rope - Yannig.S - 08-07-2021

(08-07-2021, 12:24 PM)josemendez Wrote: Oh, ok!

Getting a closed, circular rope is easy: simply click the "open/closed" toggle in the path editor, and move your control points around to give it a circular shape. See:
http://obi.virtualmethodstudio.com/manual/6.2/ropesetup.html

Then, to launch it you can just use rope.AddForce() (behaves just like Unity's rigidbody.AddForce()) to launch your rope with a force of any direction/magnitude.

let me know if you need further help.

kind regards,

Yes great thank you very much Jose Mendez!
Indeed now I manage to throw my rope, thanks to the "AddForce" of the rope, I had not seen it in the documentation ...

Now I have other problems which appeared :
  • the strings do not "recognize" each other, ie I will throw several rings and they will all be superimposed without colliding :/
  • I can't keep the ring shape of my rope, once it is installed it is completely free ...
Thank you again for your help,

Yannig.


RE: Throw my rope - josemendez - 08-07-2021

Quote:Indeed now I manage to throw my rope, thanks to the "AddForce" of the rope, I had not seen it in the documentation ...

It's in the API docs, ObiActor class:
http://obi.virtualmethodstudio.com/api.html

(08-07-2021, 01:58 PM)Yannig.S Wrote: the strings do not "recognize" each other, ie I will throw several rings and they will all be superimposed without colliding :/

First make sure that Particle Collisions are enabled in the ObiSolver component, under the "constraints" foldout.
Then, if you're using Obi 6.1 or older, make sure your ropes have different phase values (see: http://obi.virtualmethodstudio.com/manual/6.1/collisions.html)
If you're using Obi 6.2, make sure your rope collides with mask/category are set to collide with each other (see: http://obi.virtualmethodstudio.com/manual/6.2/collisions.html)

You can set both phases (6.1) and categories/masks (6.2) in the rope's path editor, on a per-control point basis.

(08-07-2021, 01:58 PM)Yannig.S Wrote: I can't keep the ring shape of my rope, once it is installed it is completely free ...

By default ropes behave like ropes, that means they're very easy to bend. Make sure that bending compliance and max bending are both set to zero (in the ObiRope component). To obtain even more stiffness, you can use more bending constraint iterations (in ObiSolver, under "constraints" foldout) or use more substeps. The manual contains an in-depth explanation of how the simulation works and how iterations/substeps affect it:
http://obi.virtualmethodstudio.com/manual/6.2/convergence.html

kind regards,


RE: Throw my rope - Yannig.S - 08-07-2021

This is the best support I have ever seen on a forum: p

Thank you very much I will try this right away Sonrisa