Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope Collision Detection
#3
Hi,
 yes its partially working now. As I said I have 3 ropes and all 3 of them are in contact. But the below code only giving two rope collision. I 've set ids for each rope. 1, 2 and 3 in ropeOrder variable. I am getting only 2 and 3 in logs. top rope collisioin is missing. Am I missing something ? Do I have to consider c.bodyB somewhere ?

Code:
foreach (var c in contacts.contacts)
{
    int particleIndex = solver.simplices[c.bodyA];
    ObiSolver.ParticleInActor pa = solver.particleToActor[particleIndex];
    TangledRope tr = pa.actor.GetComponent<TangledRope>();
    tr.collided = true;
    tr.lastCollidedTime = Time.time;
    Debug.Log("pa: " + pa + ", actor: " + tr.ropeOrder);

}
Reply


Messages In This Thread
Rope Collision Detection - by kripa1415 - 10-06-2024, 08:18 AM
RE: Rope Collision Detection - by josemendez - 10-06-2024, 08:37 AM
RE: Rope Collision Detection - by kripa1415 - 10-06-2024, 09:32 AM
RE: Rope Collision Detection - by josemendez - 10-06-2024, 10:35 AM