Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rope pulling problem
#2
(29-08-2022, 04:24 PM)shaylavi Wrote: Im shooting a rigidbody that a rope is attached to and making it longer cursor.ChangeLength() until it reaches a wall.
When it does I "lock" the length and then the player (which is attached to the other side of the rope) gets a massive velocity change towards the shot rigidbody.
Anyway to cancel out this velocity?

Hi!

Well, this depends on a lot of things:
- Where's the cursor placed along the rope?
- Are you setting the length instantly (in a single frame) or over multiple frames?
- What's the mass of the rope compared to the mass of the player?

If your rope is heavy compared to the player and the length is changes in a single frame, then the player will be catapulted towards the shot rigidbody, this is the expected behavior. Imagine launching a projectile to which you're attached via a heavy chain, the combined inertia of the chain + the projectile would pull from you.

You can check out the included RopeGrapplingHook sample scene for an example of how to implement a grappling hook.

kind regards,
Reply


Messages In This Thread
Rope pulling problem - by shaylavi - 29-08-2022, 04:24 PM
RE: Rope pulling problem - by josemendez - 29-08-2022, 05:43 PM
RE: Rope pulling problem - by shaylavi - 29-08-2022, 06:17 PM
RE: Rope pulling problem - by josemendez - 30-08-2022, 07:21 AM