Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Proper way of moving rope end points
#2
(05-06-2024, 02:23 PM)kripa1415 Wrote: I've added pins on both ends of the rope. I've created configurable joints on the rope end point node and dragging it using rigidbody MovePosition.

Hi!

If you've pinned the rope ends to rigidbodies, what do you need the configurable joints for? Joints are meant to constraint two rigidbodies together, but as far as I understand your use case of there's no need to do this?

Maybe you're using the configurable joint to keep the end knob in place on the board when the user is not dragging it around? If that's the case it would be far easier to just set the rigidbody to kinematic.


(05-06-2024, 02:23 PM)kripa1415 Wrote: I can't use force here as I want the end point knob to move along with my finger.

Why not? A force is just a mass-weighted acceleration, that is, a change in velocity. If you set the velocity such that it takes the end point knob to the position of your finger (plus some damping to avoid overshoot) it will follow the finger perfectly.

(05-06-2024, 02:23 PM)kripa1415 Wrote: Though I've applied max limit on the knob distance how far player can drag, it still break physics sometimes when I drag fast. Is there any possibility to avoid happening ?

The whole point of using physics for this is that you don't need to artificially set a distance limit: once the rope is completely taut, it will apply a force to the end knob that is equal in magnitude (but opposite in direction) to the force that the knob is applying on the rope (since the user is dragging the knob around). At that point, both forces cancel out and it won't be possible to continue pulling the rope.

kind regards,
Reply


Messages In This Thread
RE: Proper way of moving rope end points - by josemendez - 06-06-2024, 08:24 AM