Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Max Rest Length
#2
(01-11-2020, 10:12 PM)VagabondOfHell Wrote: Hi Obi

I'm curious if there is a reliable way of calculating the Maximum Rest Length based off of the pooled particle count. During my testing I've beenĀ setting my cursor length to Mathf.Infinity in the OnElementsGenerated callback of the instantiated ropeĀ and then resetting it to it's previous length to determine this. Just curious if there's a better way to go about it.

Thank you, and fantastic job on the Obi Rope asset!

Hi there!

Pooled particles are spaced apart using

Code:
rope.ropeBlueprint.interParticleDistance

So you can take the rope's rest length, and add rope.ropeBlueprint.interParticleDistance * rope.ropeBlueprint.pooledParticles to it. That should be a pretty reliable estimation of the rest length once all pooled particles are used.

cheers!
Reply


Messages In This Thread
Max Rest Length - by VagabondOfHell - 01-11-2020, 10:12 PM
RE: Max Rest Length - by josemendez - 03-11-2020, 09:42 AM
RE: Max Rest Length - by VagabondOfHell - 03-11-2020, 09:28 PM
RE: Max Rest Length - by josemendez - 04-11-2020, 11:13 AM