Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Dynamic Grappling hook rope length?
#1
Currently in my game i have a character who uses momentum to throw a grappling hook object. As soon as the character throws the hook i enable the obirope mesh and set pin constraints on the hand and the bottom of the hook. I would like for the rope to dynamically change length in relation to the velocity of the hook. But the rope restrains the grappling hook from flying flying in a normal arc. I have been using pin constraints akin to the grappling hook sample scene instead of particle attachments. I have tried to use both static and dynamic particle attachments but this causes the rope to not attach properly to the hand and grappling hook. how can i change the length of the rope as the grappling travels without  affecting the path, (but without static attachments because i'd like for the rope and grappling hook to interact eventually)                                                                                                                            also loving obirope so far. just wish i could figure this out. Interesante


Attached Files
.cs   ObiRopeSpawn.cs (Size: 4.31 KB / Downloads: 7)
.gif   gancho.gif (Size: 79.34 KB / Downloads: 18)
Reply
#2
Enable "kinematic for particles" in your ObiRigidbody component. That will make the hook rigidbody kinematic as far as particles are concerned, causing the rope to behave as if the hook had infinite mass. Essentially, the rope will follow the hook but the hook will ignore the rope.

You can then disable it after you need your rope and hook to interact with each other.

Note you could also just give more mass to the hook, or less mass to the rope, for a similar effect that's not so binary.

Let me know how it goes Sonrisa
Reply