01-12-2021, 02:54 PM
(This post was last modified: 01-12-2021, 02:56 PM by josemendez.)
(01-12-2021, 02:34 PM)greyhawk Wrote: It's rare, but it says that even if I pull the strings away from each other, they are in contact with each other. not sure, but this happens after partial thinning after another contact. I don't know if it's relevant.
Your code does not check for collisions, it considers all contacts: both speculative and real. Try only considering contacts such that:
Code:
if (contact.distance < 0.01)
From the manual:
http://obi.virtualmethodstudio.com/manua...sions.html
Quote:Obi uses a continuous-collision detection method known as speculative contacts, which can generate contacts even when an actual collision isnĀ“t taking place. If you want to prune all speculative contacts and consider actual collisions only, check for distances below a small threshold (e.g 0.01).
Also, you can check the first code example in that page: it draws speculative and actual contacts using different colors.