Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Rest Length" returns unexpected values
#1
Pregunta 
I've set up a rope that is completely linear - the start point, end point and tangents are all in a straight line.

I've temporarily removed the [HideInInspector] tags on the field "ObiRopeBlueprintBase.m_RestLength" so I could see its value. Looking at the code, it appears to represent the total length of all the segments in the rope as measured from the distances between connected particles. However, the rest length value displayed was very off.

The start and end points were exactly 2m apart, but the rope's reported rest length was reported to be 42!
On top of that, changing the resolution will cause the rest length to change anywhere between 202 (at a resolution of 0) and 6.878044 (at a resolution of 1).

I looked through the code can't make sense of why it'd come up with wildly unexpected values on a linear rope. Even if the rope was curved, the length should increase with resolution, not decrease.

Is it measuring the length of the rope relative to something else?
Reply


Messages In This Thread
"Rest Length" returns unexpected values - by Hatchling - 20-05-2021, 03:10 PM