Help Rope not colliding with itself - 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 not colliding with itself (/thread-2247.html) |
Rope not colliding with itself - Marat Giliazov - 18-05-2020 Hi, I'm trying to make a rope winding over the rotating stick/cylinder. But whatever I do the rope does not self-collide as expected. See the GIF attached. - self-collision is enabled. - resolution is 0.7 (I've even tried set it to 1, with no effect) I've tried to increase collision and particle collision constraint iterations, reduce relaxation, play around with substeps and physics timestamps. But without any success. Rope still not winding. Coils are just fall trough each other. Could anyone say what I'm doing wrong and if such behaviour ever possible, please? Thanks! RE: Rope not colliding with itself - josemendez - 18-05-2020 Hi Marat, If you're using a rope cursor to extend the length of the rope, there's a known bug that will deactivate self-collisions between newly created particles. Fortunately the fix is easy. Open the ObiRope.cs file, and add this right at the end of the RebuildConstraintsFromElements() method: Code: RecalculateRestPositions(); Should look like this: Quote: //<...more stuff here...> Note that the cost of a rope increases with its length. Depending on what your use case is, a particle-based simulator like Obi might be a bad choice. Alternatives exist that, while much more limited, allow to have arbitrarily long cables/ropes with constant cost. Check out our other cable/rope asset if interested: https://assetstore.unity.com/packages/tools/physics/filo-the-cable-simulator-133620 RE: Rope not colliding with itself - Marat Giliazov - 19-05-2020 (18-05-2020, 06:25 PM)josemendez Wrote: Hi Marat, Thanks, it helped! Now the rope behaves as I wanted: Yes, I understand that it might be not a right tool for my needs regarding performance, but just looking for a quick way to make a "proof of concept" of such mechanic before investing in a self-made solution. As for the Cable Simulator asset - thanks for the reference, I've missed it as it's not in "Obi family" (at least by naming), looks interesting. But as I see from the description: Quote:What it doesn't do:And as you see from the reference and by my initial question - self-collision is important in my case. I have another question if you don't mind - is it possible to make exact particles kind of "static" when they touched my reel (rotating cylinder)? By static I mean to stop calculating any constraints other than collisions for such particles so keep them nailed to their position and behave just as colliders on the reel's surface? I think, I need to somehow do this manually - generate a mesh with unity colliders on the points where the rope touched the reel and render it in the same way as Obi Rope is rendered and use Obi Rope only as a visualization of the "controller" (I assume, that the player can move the free end of the rope to control the position where the rope should wind over the reel). But it would be perfect, if I can reach this by Obi Rope itself without self-made stuff. Thanks again for your asset and support! |