Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Activating/deactivating the rope, changing its length in real time
#1
Greetings again. I have once again encountered a problem. The thing is that my ObiRope has two states. There are two players and there is a rope between them (like in Unravel), the rope becomes material only when both players grab it. The thing is that when I disable ObiRope and turn off collisions, so that it continues its life cycle, but visually it is not visible. I do this so that when I turn on ObiRope rendering, the rope does not make jerks and jumps when changing its length through Cursor. However, I think that I don't need its life cycle in the off state at all. But there is a problem. Players move all the time, and ObiRope.restLentght should always be = Vector3.Distance(player1.transform.position, player2.transform.position). I change its length via cursor and everything would be fine, but - when I turn on the rope rendering and set cursor.ChangeLength(Vector3.Distance(player1.transform.position, player2.transform.position)) there are constantly jerks. I increase and decrease the number of sub-steps in distance and in solver, but it either heavily loads the hardware or behaves very unstable. Please advise me, how do I turn on the rope, set its length in 1 frame between players, and so that it does not jerk and do not attract players jerks, at the same time you should take into account that when you completely disable ObiRope, ObiRopeAttachment also do not follow the players and when you turn on there is a strong jump rope.

How can I calm the rope, setting it evenly stretched between players always, despite the distance between them, limiting it only to increase in length when the characters are separated from each other and shortening if they come together and be able to turn it off and on without jerks and jerks.
Reply


Messages In This Thread
Activating/deactivating the rope, changing its length in real time - by Alexander34 - 29-09-2023, 11:38 AM