Obi Official Forum
How do i control the length of the wire? - 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 do i control the length of the wire? (/thread-1442.html)



How do i control the length of the wire? - Bhavani G - 22-10-2019

Hi,

I am working with Obi ropes and my issues is when i fixed one end of the rope with pin constraint and i am trying to grab the other end of the rope with controller it is working fine but when i grab the rope,it is stretching how much ever i grab.

Please anyone suggest me how do i limit the length of the rope.


Thanks.


RE: How do i control the length of the wire? - josemendez - 22-10-2019

(22-10-2019, 08:39 AM)Bhavani G Wrote: Hi,

I am working with Obi ropes and my issues is when i fixed one end of the rope with pin constraint and i am trying to grab the other end of the rope with controller it is working fine but when i grab the rope,it is stretching how much ever i grab.

Please anyone suggest me how do i limit the length of the rope.


Thanks.

You can't expect a physics simulation to somehow impose limits on your input system automagically. Input is not dependent on the physics engine in any way. That's something you must implement yourself.

Easiest way is to restrict the user's controller position so that it cannot move further than the rope's length, measuring from the point where the rope is attached to another object.