Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Generated rope with pin constraints
#2
Hi,

You've probably pinned the rope inside the cube, very close to its center of mass. This will result in two issues:
- The cube won't rotate, as any force applied very close to the center of mass of a rigidbody does not cause a rotation (or a really small one).
- The rope and the cube will generate a force-feedback loop, as there's now two constraints that can't be met at the same time:
  • PinConstraint: the end of the rope must be inside the cube.
  • CollisionConstraint: the end of the rope must be outside of the cube.

Clearly these two are at odds with each other: the collision constraint pushes the rope away from the collider, but the pin constraint pushes it back in. This results in the seizure-like behavior in your video.

This situation, and why it is undesirable is explained in the last part of the manual page for pin constraints:
http://obi.virtualmethodstudio.com/tutor...aints.html

Solutions:
- Set the last few particles in the rope to the same phase as the cube collider.
- Make sure the rope is pinned outside of the cube (the offset position you pass to the AddConstraint method is the position the particle will be pinned to, expressed in the collider's local space).

Let me know how it goes!
Reply


Messages In This Thread
Generated rope with pin constraints - by pQuex - 07-05-2020, 01:21 PM
RE: Generated rope with pin constraints - by josemendez - 07-05-2020, 02:11 PM