Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Grabbing the rope
#1
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?
Reply
#2
(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/tutor...sions.html
http://obi.virtualmethodstudio.com/tutor...aints.html
Reply
#3
Would love to see an example of this in action...
Reply