Obi Official Forum
Help Grabbing the 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: Help Grabbing the rope (/thread-743.html)



Grabbing the rope - innovine - 13-11-2018

In my game the player hands are rigidbodies, moving by AddForce() calls. Is it possible for me to detect when a hand collides with a piece of the rope, and when this occurs, generate a pin constraint between hand and rope, so that the player is able to grab it in the middle and then pull on it? The rope itself will then pull on an attached rigidbody on its ends? Think of an astronaut with a toolbox on a tether... and he pulls on the middle of the tether to jerk the rope and reel in the tool box... is Obi Rope the right thing for this?


RE: Grabbing the rope - josemendez - 14-11-2018

(13-11-2018, 10:33 PM)innovine Wrote: In my game the player hands are rigidbodies, moving by AddForce() calls. Is it possible for me to detect when a hand collides with a piece of the rope, and when this occurs, generate a pin constraint between hand and rope, so that the player is able to grab it in the middle and then pull on it? The rope itself will then pull on an attached rigidbody on its ends? Think of an astronaut with a toolbox on a tether... and he pulls on the middle of the tether to jerk the rope and reel in the tool box... is Obi Rope the right thing for this?

Yes, this is perfectly doable. You can simply use collision callbacks, then add pin constraints to those particles that have collided. See:
http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html
http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html


RE: Grabbing the rope - Mickman - 29-11-2018

Would love to see an example of this in action...