Hi, I am working on a project where I need to check if a rope is colliding with another rope, if not I will then destroy that rope after enough frames without collision passes.
It is very similar to how `TangledRopes.unity` sample works. I access the solver and on `Solver.OnParticleCollision()`event I call my collision checker function, here's a snippet of the code and my issue:
I never can access to the "Do Something" part of the code. In my debugging I found that EVERY contact is from `Rope_0` and none is from `Rope_1`. The ropes are on top of eachother, even twisted together. They are under the same solver. They are both in group 0 in particles and points in blueprint.
Why may this be?
It is very similar to how `TangledRopes.unity` sample works. I access the solver and on `Solver.OnParticleCollision()`event I call my collision checker function, here's a snippet of the code and my issue:
Code:
private void Solver_OnParticleCollision(ObiSolver solver, ObiNativeContactList contacts)
{
for (int i = 0; i < contacts.count; ++i)
{
var ropeA = solver.particleToActor[solver.simplices[contacts[i].bodyA]].actor;
var ropeB = solver.particleToActor[solver.simplices[contacts[i].bodyB]].actor;
if (ropeA == ropeB) //Always true for some reason
{
//Breakpoint
continue;
}
//Do Something
}
}
I never can access to the "Do Something" part of the code. In my debugging I found that EVERY contact is from `Rope_0` and none is from `Rope_1`. The ropes are on top of eachother, even twisted together. They are under the same solver. They are both in group 0 in particles and points in blueprint.
Why may this be?