Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Problems extending rope
#1
I recently started prototyping for a project I would like to work on and needed ropes and chains so I purchased ObiRope. I looked at the Crane sample and read the documentation on extending the rope from a cursor, but I am having some difficulty getting it to work. From what I understood from the documentation, I need to add an Obi Rope Cursor component and make sure Obi Rope has Pooled Particles. I have set the Pooled Particles to various values but it does not change how far I can extend the rope. It always changes itself to be between 0 and 20 when I start to extend or retract the rope. I'm not sure if I missed something or if it just is not behaving like it should be. I am using Unity 2018.1.4f1 and Obi Rope 3.5
Reply
#2
(16-06-2018, 02:28 AM)Butter1484 Wrote: I recently started prototyping for a project I would like to work on and needed ropes and chains so I purchased ObiRope. I looked at the Crane sample and read the documentation on extending the rope from a cursor, but I am having some difficulty getting it to work. From what I understood from the documentation, I need to add an Obi Rope Cursor component and make sure Obi Rope has Pooled Particles. I have set the Pooled Particles to various values but it does not change how far I can extend the rope. It always changes itself to be between 0 and 20 when I start to extend or retract the rope. I'm not sure if I missed something or if it just is not behaving like it should be. I am using Unity 2018.1.4f1 and Obi Rope 3.5

Make sure you reinitialize the rope after changing the size of the particle pool. They are only allocated once upon initialization (that's why its a pool Guiño).
Reply
#3
(16-06-2018, 11:58 AM)josemendez Wrote: Make sure you reinitialize the rope after changing the size of the particle pool. They are only allocated once upon initialization (that's why its a pool Guiño).

I already thought to try that, it did not fix the problem.
Reply
#4
(17-06-2018, 12:02 AM)Butter1484 Wrote: I already thought to try that, it did not fix the problem.

I can't reproduce the behavior you describe. Ropes can be extended up to the maximum amount of pooled particles. Tried it in the Crane sample scene.

Are you sure the code you're using to call cursor.ChangeLength() isn't somehow limiting the maximum rope length?
Reply
#5
(18-06-2018, 09:37 AM)josemendez Wrote: I can't reproduce the behavior you describe. Ropes can be extended up to the maximum amount of pooled particles. Tried it in the Crane sample scene.

Are you sure the code you're using to call cursor.ChangeLength() isn't somehow limiting the maximum rope length?

It shouldn't be, my code is
Code:
public void Lower()
   {
       cursor.ChangeLength(rope.RestLength + speed * Time.deltaTime);
   }

   public void Raise()
   {
       cursor.ChangeLength(rope.RestLength - speed * Time.deltaTime);
   }
Reply
#6
(18-06-2018, 09:09 PM)Butter1484 Wrote: It shouldn't be, my code is
Code:
public void Lower()
   {
       cursor.ChangeLength(rope.RestLength + speed * Time.deltaTime);
   }

   public void Raise()
   {
       cursor.ChangeLength(rope.RestLength - speed * Time.deltaTime);
   }

Then there must be something else limiting the rope length. Pretty much impossible to tell without taking a look at your project, it would be nice if you could share it: support(at)virtualmethodstudio.com
Reply
#7
(20-06-2018, 08:04 AM)josemendez Wrote: Then there must be something else limiting the rope length. Pretty much impossible to tell without taking a look at your project, it would be nice if you could share it: support(at)virtualmethodstudio.com

I have just sent an email with my project
Reply
#8
Was your issue solved, because I'm having the same issue.
I set the pool to 1024, but once I try to change the length, it gets reset to 256 (a value which I had set it to before)
Iv'e re-initialized the rope after changing, re-imported the asset pack, rested my machine, everything, but it ALWAYS gets reset.

Code:
if (Input.GetAxis(axis) != 0f)
{
     float input = Input.GetAxis(axis) * 1f;// (Mathf.Abs(Input.GetAxis("RIGHT_ROTATION")) + 1);
    ropeLength -= input * reelSpeed * Time.deltaTime;
    cursor.ChangeLength(ropeLength);
    rope.uvScale.y = ropeLength / 4f;
    cursor.normalizedCoord = 0.5f;
}


This is the ONLY code where the rope is accessed AT ALL. Nowhere in the rest of the project is the rope ever referenced.

Edit/ Update: re-initializing doesn't do anything anymore. I copied the rope and re-initialized it, and it kept the 1024 pool (yay!) I reinitialized the original one, nothing changed. Still had the small pool, still had the pin constraints, it just didn't do anything...
Reply