Get current batch index and a constraint index in oby tear cloth - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html) +--- Thread: Get current batch index and a constraint index in oby tear cloth (/thread-2927.html) |
Get current batch index and a constraint index in oby tear cloth - DenisBlack - 12-05-2021 Hi, mb anybody can help me. I try to make tearing cloth by some collision (like scissors). I get Particle id from collision detect : 900 id; But dont understand how to correctly get current batch and constaint index. In ObiTearableCloth.cs i saw ApplyTearing method with calculate by force and get some code from there. Code: List<StructuralConstraint> tornEdges = new List<StructuralConstraint>(); How to i can iterating check current active constreint wich collect my particle id? UPD: Ok, next time first need to write on note my task - that help to collect thoughts )) Code: for (int i = 0; i < batch.activeConstraintCount; i++) RE: Get current batch index and a constraint index in oby tear cloth - josemendez - 13-05-2021 Glad you beat me to the answer . Good job in figuring it out! Let me know if I can help anytime. |