Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Assistance needed with rope collisions
#1
I've created the following situation:

- A rope is attached to a collider.
- The collider spins.

In theory, the rope should wrap around the collider.

In practice:

- If the collider is a box collider, it works well.
- If the collider is a mesh collider, results are sporadic. Sometimes the rope passes through the collider and won't collide at all. Sometimes the rope only "catches" in some places and will slide through the collider as it rotates.

Any thoughts or tips on this? I have taken a video of the behavior here: https://www.loom.com/share/74f5b542211d4...95ce847f10
Reply
#2
(25-01-2020, 05:20 PM)bluezephyrapps Wrote: I've created the following situation:

- A rope is attached to a collider.
- The collider spins.

In theory, the rope should wrap around the collider.

In practice:

- If the collider is a box collider, it works well.
- If the collider is a mesh collider, results are sporadic. Sometimes the rope passes through the collider and won't collide at all. Sometimes the rope only "catches" in some places and will slide through the collider as it rotates.

Any thoughts or tips on this? I have taken a video of the behavior here: https://www.loom.com/share/74f5b542211d4...95ce847f10

Hi,

This is not surprising as MeshColliders are "hollow", not solid: Once a particle gets inside of it, even if it's only for a frame, it can't be projected back out. You can use Distance Fields as a more robust and efficient alternative:
http://obi.virtualmethodstudio.com/tutor...ields.html

Now, it looks to me like you're trying to make a Zen Bound type of game. You *will* run into performance issues, as the cost of a discrete physics simulation grows with the amount of particles (that is, with the length of the rope). Zen Bound does not use any physics whatsoever, despite what it might look like. It is a purely geometrical approach, similar to the ninja rope in the Worms series. The cost of such approach is constant regardless of the amount of rope wrapped around the object.

kind regards,
Reply