16-04-2025, 01:38 PM
(This post was last modified: 16-04-2025, 01:46 PM by josemendez.)
(04-11-2021, 10:35 AM)dinhtai1104 Wrote: Fast reply, thanks
Can you show me a sample about it, I change OnCollision to OnParticleCollision but it appears some error at line
Error is:Code:var col = world.colliderHandles[contact.bodyB].owner;
Hi!
OnParticleCollision returns collisions between particles. You're trying to access the colliders array using the index of a simplex (which doesn't make sense) so you're getting an index out of range error since there's more simplices than colliders in the scene.
Instead, use solver.particleToActor to find the actor that the particle belongs to. See the manual for a detailed explanation and code examples:
https://obi.virtualmethodstudio.com/manu...sions.html
kind regards,