Help Rope stretch problem - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Help Rope stretch problem (/thread-4134.html) |
Rope stretch problem - Agony - 19-03-2024 Hello, I am making a rope length real-time update project, encountered some problems, I hope I can get help Below is the method to dynamically change the length of the rope, which is performed in the Update, which cannot be changed。 Code: public void ChangeRopeLength() I wonder what method I can use to change the rope length in Update when I change the Distance Constraints to 1,So that the length of the rope can be normal variation, rather than infinite elongation RE: Rope stretch problem - josemendez - 19-03-2024 Hi! Increasing the amount of substeps should work. This will increase simulation quality - reducing spurious stretching, a much better alternative to setting stretching scale to 0.5. For an in-depth explanation of how substeps/iterations affect results, see: http://obi.virtualmethodstudio.com/manual/6.3/convergence.html RE: Rope stretch problem - Agony - 19-03-2024 (19-03-2024, 07:28 AM)何塞门德斯 Wrote: 你好!增加子步骤您好,感谢您的回复,但是我的场景中可能有很多绳子,我担心增加子步骤数量会导致性能问题 RE: Rope stretch problem - josemendez - 19-03-2024 (19-03-2024, 07:33 AM)Agony Wrote: 您好,感谢您的回复,但是我的场景中可能有很多绳子,我担心增加子步骤数量会导致性能问题 Obstacles/colliders in the scene are not affected by substeps. Collision detection is only performed once per frame, regardless of the amount of substeps used. Only constraint solving and integration are performed once per substep, so unless you have extremely long ropes (or many ropes), increasing the amount of substeps should be fine. RE: Rope stretch problem - Agony - 19-03-2024 (19-03-2024, 08:35 AM)josemendez Wrote: Obstacles/colliders in the scene are not affected by substeps. Collision detection is only performed once per frame, regardless of the amount of substeps used. Only constraint solving and integration are performed once per substep, so unless you have extremely long ropes (or many ropes), increasing the amount of substeps should be fine.Ok, one more question, can I dynamically change the mass of every particle in the rope? RE: Rope stretch problem - josemendez - 19-03-2024 (19-03-2024, 09:24 AM)Agony Wrote: Ok, one more question, can I dynamically change the mass of every particle in the rope? Yes, you can change any particle property at runtime. See: http://obi.virtualmethodstudio.com/manual/6.3/scriptingparticles.html |