Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Filo - Calculating weight on cable point
#9
(23-03-2020, 12:35 PM)MarcPilgaard Wrote: I have been trying fiddling with it and placed the functionality in LateUpdate() but the weight still seem to fluctuate quiet a lot when the cranes are moving. We are talking about +/- 50% fluctuations from the rest position. I have found another solution that works reasonable, where I simply Lerp the weight over time which makes it less apparent.

However, if possible I would like to have it resolved anyway.

I have drawn this diagram:
[Image: QGWXwDv.png]

Each crane can move independently. The upper attachment inside the crane is used to hoist or lower the hook attached on the rigidbody. Even when moving all four cranes simultaneously and with the same speed the weight fluctuates.

Hi Marc,

If using more than 1 cable attached to the same object, the weight will necessarily fluctuate. How much, depends on the mass ratio (the higher, the larger the fluctuation). This is because Unity's (and hence, Filo's) solver is iterative.

This means that the equation systems that describe the scene are not all solved simultaneously. That kind of solver would be a direct solver,  much slower and expensive.

Instead, in an iterative solver each equation is solved independently and the resulting impulses immediately applied to the bodies involved. This is repeated (iterated) multiple times each step. This means each cable calculates and applies a impulse ignoring all other cables, they only react instead of predict. The more times you iterate over all equations, the closer to the ground-truth solution you get. Unfortunately, the result highly depends on the amount of iterations and specially the order in which equations were evaluated. This method is known as sequential impulses or SI.

Using more iterations (you can find this setting in the cable's solver component), and/or a smaller timestep (found in Unity's Time manager) will reduce the fluctuations at the cost of performance. Applying a low-pass filter to the reported mass values (which is essentially what lerping with the accumulated value does) should also be acceptable in most cases.
Reply


Messages In This Thread
RE: Filo - Calculating weight on cable point - by josemendez - 23-03-2020, 02:19 PM