Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision Between 2 SoftBody
#4
(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
Code:
var col = world.colliderHandles[contact.bodyB].owner;
Error is:

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,
Reply


Messages In This Thread
Collision Between 2 SoftBody - by dinhtai1104 - 04-11-2021, 10:24 AM
RE: Collision Between 2 SoftBody - by josemendez - 04-11-2021, 10:34 AM
RE: Collision Between 2 SoftBody - by dinhtai1104 - 04-11-2021, 10:35 AM
RE: Collision Between 2 SoftBody - by josemendez - 16-04-2025, 01:38 PM