24-09-2019, 05:48 PM
(This post was last modified: 24-09-2019, 05:51 PM by BisuDagger.)
(17-09-2019, 11:22 AM)HenryChinaski Wrote: Hi,
I want to have a rope hanging between two poles, representing an electrical cable. I created a rope object, assigned a line renderer to it and a curve editor.
Inside the curve editor I positioned the two points at the positions of the two poles, selected the first and last particle and assigned a handle for each. The distance iteration property of the obi solver is at 3. On the rope the distance constrain stretching scale is at 0.01 and all stiffnesses at 1.
If I hit play now (the in-editor-playing doesn't work for me) the rope hangs inbetween both points correctly, but in the middle it stretches way more than I would like it to stretch (far through the floor).
Increase the Constraintistance iteration value to 20.
Change the UV scale in Obi Rope Extruded Renderer: Y value = 3 or greater
Images attached below
I read a little bit in the forum but the solutions provided don't help me like decreasing the time step of our whole game.
There must be a way to determine the length of a rope I believe? Could you give me a hint how to solve this issue?
If any of the developers were KIND ENOUGH to reply, this is a pain in the arse.
Here's my current work around which I absolutely hate.
1. obiRope.CalculateLength() - this is the true length of your rope. You want this value to be the distance in unity units
2. cursor.ChangeLength(distance); - this changes the rest length of the rope, but that is not the same as your true length
This is where it gets fucked up. Run a coroutine
while (obiRope.CalculateLength() == distance)
cursor.ChangeLength(obiRope.RestLength + or - a value); //do this until the Calculated Length matches your desired length
Best regards,
Daniel
(24-09-2019, 05:25 PM)HenryChinaski Wrote: Okay, let's try a simple yes-or-no question:
Could it be that it is technically not possible to determine the length of an Obi Rope without changing overall parameters like the time step?
Besides my above reply, make sure your pooled particles is large enough. You MUST reinitialize after you change this value and then re-setup your particles that were pinned.