Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FishingRod and SmoothCursor?
#1
Pregunta 
hi. Sonrisa

Obi Rods suitable for FishingRods(bending, custom 3d model)? 

And

I'm calculating the rope stretch with:
Code:
stretch = rope.CalculateLength() - rope.RestLength;
 if 0 or negative the rope not stretched, but if i use 
Code:
cursor.ChangeLength(rope.RestLength + hookExtendRetractSpeed * 15 * Time.deltaTime);

I want to simulate the opened reel when stretch > 0

My Stretch value goes extremely high. my default stretch when i'm moving with the rod 0.1-0.2 but if i use Cursor this value goes between: 0.8-!!16!! and my rope breaks instant. I'm using it wrong?  Or ObiRope has smoothCursor? Sonrisa
Reply
#2
(21-06-2019, 03:49 PM)ayoci Wrote: hi. Sonrisa

Obi Rods suitable for FishingRods(bending, custom 3d model)? 

And

I'm calculating the rope stretch with:
Code:
stretch = rope.CalculateLength() - rope.RestLength;
 if 0 or negative the rope not stretched, but if i use 
Code:
cursor.ChangeLength(rope.RestLength + hookExtendRetractSpeed * 15 * Time.deltaTime);

I want to simulate the opened reel when stretch > 0

My Stretch value goes extremely high. my default stretch when i'm moving with the rod 0.1-0.2 but if i use Cursor this value goes between: 0.8-!!16!! and my rope breaks instant. I'm using it wrong?  Or ObiRope has smoothCursor? Sonrisa

Hi there,

If you're using high enough values for hookExtendRetractSpeed, expect a sudden change in rope RestLength, but not in actual rope length until constraints have had a chance to react to the new length. This would cause a huge spike in strain (the difference/ratio between rest length and actual length), which is what you're seeing.

There's no such thing as a smoothCursor. A particle based rope is a discretization of a real-world continuous body, as such when you change its length, new discrete chunks of rope (particles) must be added.

My advice would be to use a low-pass filter on your "stretch" value, so that you can ignore sudden spikes.
Reply