Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Rope cutting with collision
#3
Thank you! After I change the code to this it works
Code:
            var collider = ObiColliderWorld.GetInstance().colliderHandles[contact.bodyB].owner;
            if (collider == null) return;

            // retrieve the offset and size of the simplex in the solver.simplices array:
            int simplexStart = solver.simplexCounts.GetSimplexStartAndSize(contact.bodyA, out int simplexSize);

            // starting at simplexStart, iterate over all particles in the simplex:
            int particleIndex = solver.simplices[simplexStart];

            // do something with each particle, for instance get its position:
            var particleInActor = solver.particleToActor[particleIndex];
            // retrieve the actor this particle belongs to:
            var actor = particleInActor.actor;

I've done a rope cut sequence for unlocking a chest. Any tips to improve will be appreciate!

Reply


Messages In This Thread
Rope cutting with collision - by spikebor - 31-07-2023, 09:11 AM
RE: Rope cutting with collision - by josemendez - 31-07-2023, 11:05 AM
RE: Rope cutting with collision - by spikebor - 31-07-2023, 04:24 PM