Obi Official Forum
Help How do I add length in runtime? - 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: Help How do I add length in runtime? (/thread-2414.html)



How do I add length in runtime? - voodoo-bird - 10-08-2020

How do I add/reduce length to a rope in runtime? The Youtube tutorials don't cover this.

I use Playmaker. Advise directly for this would be most helpful, but otherwise let me know the normal script/component way and I can figure it out from there. 

Thanks.


RE: How do I add length in runtime? - josemendez - 10-08-2020

(10-08-2020, 02:56 PM)voodoo-bird Wrote: How do I add/reduce length to a rope in runtime? The Youtube tutorials don't cover this.

I use Playmaker. Advise directly for this would be most helpful, but otherwise let me know the normal script/component way and I can figure it out from there. 

Thanks.

Hi,

Obi does not offer Playmaker support.

To change the rope length at runtime, add a ObiRopeCursor component to the rope and call its ChangeLength() method. See:
http://obi.virtualmethodstudio.com/tutorials/ropecursor.html


RE: How do I add length in runtime? - voodoo-bird - 10-08-2020

(10-08-2020, 02:59 PM)josemendez Wrote: Hi,

Obi does not offer Playmaker support.

To change the rope length at runtime, add a ObiRopeCursor component to the rope and call its ChangeLength() method. See:
http://obi.virtualmethodstudio.com/tutorials/ropecursor.html

Thank you for your quick reply. However I have a new question. I have attached one end of the rope to a physics driven helicopter. Flying that shows the rope looking normal attached. So I attached to a cube with a rigid body and only .1 mass, but the rope just gets longer instead of lifting up the cube or stopping the helicopter from getting higher. This is with default configuration for the rope.

What am I missing? I don't want the rope to stretch at all.


RE: How do I add length in runtime? - josemendez - 10-08-2020

(10-08-2020, 03:18 PM)voodoo-bird Wrote: Thank you for your quick reply. However I have a new question. I have attached one end of the rope to a physics driven helicopter. Flying that shows the rope looking normal attached. So I attached to a cube with a rigid body and only .1 mass, but the rope just gets longer instead of lifting up the cube or stopping the helicopter from getting higher. This is with default configuration for the rope.

What am I missing? I don't want the rope to stretch at all.

Make sure you're using a dynamic attachment, not a static one. As explained in the manual static attachments are only one-way, not two-way. See:
http://obi.virtualmethodstudio.com/tutorials/attachments.html


RE: How do I add length in runtime? - voodoo-bird - 10-08-2020

(10-08-2020, 03:29 PM)josemendez Wrote: Make sure you're using a dynamic attachment, not a static one. As explained in the manual static attachments are only one-way, not two-way. See:
http://obi.virtualmethodstudio.com/tutorials/attachments.html

Thank you. Sorry one more question. This does now lift the object off the ground, however it seems like the rope is still stretching. How do I ensure 0 stretch?

EDIT: nevermind. I think it's just the resolution setting on the blueprint. Great asset. Thanks for the help.


RE: How do I add length in runtime? - Mostyndarko - 03-12-2021

(10-08-2020, 02:56 PM)voodoo-bird Wrote: How do I add/reduce length to a rope in runtime? The Youtube tutorials don't cover this.

I use Playmaker. Advise directly for this would be most helpful, but otherwise let me know the normal script/component way and I can figure it out from there. 

Thanks.

If you're using Playmaker. You need to use the 'call method' action on the Obi Rope Cursor Component.

Call void Change Length (float) and set a new Float.

I was just looking for an anwer to this to, so thought id share for anyone else looking.