Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  distance constraints
#1
I am new to Unity so thanks in advance for your patience folks. I have a simple physics game set up where the player moves platforms around to get a bouncing ball from one point of the "course" to another. I want to constrain the movement of these platforms by attaching a rope between them and another fixed object. The problem is that the rope will stretch forever, no matter how much I change the distance constraints, so it does not restrict the movement of the platform. I hope someone can point me in the right direction on this.

Thanks.
Reply
#2
(05-12-2018, 04:46 PM)TootsManuva Wrote: I am new to Unity so thanks in advance for your patience folks. I have a simple physics game set up where the player moves platforms around to get a bouncing ball from one point of the "course" to another. I want to constrain the movement of these platforms by attaching a rope between them and another fixed object. The problem is that the rope will stretch forever, no matter how much I change the distance constraints, so it does not restrict the movement of the platform. I hope someone can point me in the right direction on this.

Thanks.

Hi,

External forces only affect non-kinematic rigid bodies, and rope can only apply forces trough pin constraints.

So if your character is a kinematic rigid body, or not a rigidbody at all (e.g. you're moving it by directly altering its transform), then no external forces (such as those applied by the rope) will be able to affect it and the rope will just stretch indefinitely in an attempt to follow it.

Same if you've used handles or fixed particles to attach it to the rope. You must use pin constraints.

See:
http://obi.virtualmethodstudio.com/tutor...ments.html
http://obi.virtualmethodstudio.com/tutor...aints.html
Reply
#3
(06-12-2018, 12:19 PM)josemendez Wrote: Hi,

External forces only affect non-kinematic rigid bodies, and rope can only apply forces trough pin constraints.

So if your character is a kinematic rigid body, or not a rigidbody at all (e.g. you're moving it by directly altering its transform), then no external forces (such as those applied by the rope) will be able to affect it and the rope will just stretch indefinitely in an attempt to follow it.

Same if you've used handles or fixed particles to attach it to the rope. You must use pin constraints.

See:
http://obi.virtualmethodstudio.com/tutor...ments.html
http://obi.virtualmethodstudio.com/tutor...aints.html

Thank you so much for your explanation. I will look into alternative methods for constraining my character movement.
Reply