Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Particle Collision Not Working On Instantiated Rope
#4
(18-03-2022, 02:40 PM)VirtualCucumber Wrote: My only concern with this solution is that if the hand.SolverIndex was wrong then I would not be able to add force using Solver.externalForces[SolverIndex] in Hand.cs which works as seen in both gifs.

True, if you're able to apply forces to that particle using Solver.externalForces[SolverIndex] then SolverIndex must be correct.

(18-03-2022, 02:40 PM)VirtualCucumber Wrote: No collision event gets fired at all but it still collides accurately with the cube collider.

Thats' simply not possible, since the collision events contain the exact same data used for collision response. The engine reports the contacts that it has solved. If the particle is colliding, there must exist a contact against it in the contact list.

Do any of the ropes in your scene use surface collisions? if so, this assumption is incorrect:
Code:
// Get the particle index directly, as all simplices are guaranteed to have size 1:
int particleIndex = hand.Solver.simplices[contact.bodyA];

When using surface collisions not all simplices will have size 1, so the particleIndex you get is incorrect. Off the top of my head this is the only thing that could result in the behavior you're getting. See retrieving the particle involved in a contact.

In case you're not using surface collisions at all, then the behavior you describe doesn't make sense. Would it be possible for you to share your project, or at least some scene that reproduces it?
Reply


Messages In This Thread
RE: Particle Collision Not Working On Instantiated Rope - by josemendez - 18-03-2022, 02:46 PM