Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Test if rope is tense, and extend it in code
#6
(18-03-2018, 04:09 PM)usernameHed Wrote: Ok ! mmm I have one other little trouble:
I have set the pooledParticle to 50... but the moment I change the Length... like that:
cursor.ChangeLength(rope.RestLength + hookExtendRetractSpeed * Time.deltaTime);
then the variable pooledParticle drop to 9, 8, ... 0 (and not 49, 48, ... to 0...), so I have only 10 pooled Particle  to add... i don't know why i can't change it.
 
[Image: HCspbwQotAl_Capture.PNG][Image: HCspcbcIMAl_Capture2.PNG]


And one other thing... when i have my rope setup in inspector, if I want to grow the rope, and add more particle inside, how do I do ? Im' stuck with my 10 initial particle, and I want to grow it up, witout deleting and recreating the rope...
[Image: HCspgtToUOl_Capture3.PNG]

Thanks you again

You need to reinitialize the rope after changing the amount of particles in the pool. Also to make its rest state shorter or larger, you cannot change the initial properties of the rope without re-initializing it. Just click Initialize again (make sure the rope path, ObiCatmullRomCurve in your case, has the correct shape/length you want the rope to have).

cheers,
Reply


Messages In This Thread
RE: Test if rope is tense, and extend it in code - by josemendez - 18-03-2018, 05:53 PM