Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Objects placed on top of Obi Cloth keep rotating
#2
(03-03-2023, 07:39 PM)LuckyPretzel Wrote: I have a cloth that is sitting on a frame with a hole in it. The cloth is attached to the object on both sides preventing it from falling through the hole.

On top of the cloth (where the hole is located), a rounded object is resting. Unfortunately, the object will continue to rotate nonstop. With a cube, the object continues to move but it is difficult to notice and cannot overcome the hard edges to rotate. When the objects spin, they don't move positions for the most part but notice the attachments and you'll notice they're rotating in place despite being at "rest".

What can I do to prevent this from spinning? I've added friction materials as well as dampening on the cloth and solver.

Any ideas? Thanks!

Hi!

All iterative physics engines exhibit this problem: when there's multiple contacts affecting the same object, the order in which they're applied affects the outcome. If contacts are applied in approximately the same order every frame (and they are in most engines, to eliminate jittering that would otherwise happen if contacts were applied in a random order) there will always be a slight bias, since contacts applied last are more "important" as they can modify the result of all previously applied contacts.

Here's a video of the same effect taking place in a pile of regular rigidbodies in Unity. As you can see, some of the spheres will keep slowly rotating indefinitely when affected by multiple contacts:



In the case of cloth, it generates a lot of contacts around rigidbodies so this can get quite noticeable.

Unfortunately there's no proper solution for this, other than switching both Obi and Unity to an entirely different kind of physics solver - a direct solver. A typical hack is to freeze rigidbody rotation in place if their angular speed is below a threshold, this is often referred to as "sleeping".

kind regards,
Reply


Messages In This Thread
RE: Objects placed on top of Obi Cloth keep rotating - by josemendez - 05-03-2023, 07:34 PM