12-02-2021, 10:54 PM
Hi!
I've updated to Obi 6.0 and replaced contact.particle with contact.bodyA and contact.other with contact.bodyB, but when I collide 2 actors now, after the first collision or so none of the contacts are the 2 actors involved in the contact; most are null.
world.colliderHandles doesn't seem to be right either. I was wondering, what is the correct way to get the 2 actors involved in a softbody/softbody collision now?
Thanks!
Matt
I've updated to Obi 6.0 and replaced contact.particle with contact.bodyA and contact.other with contact.bodyB, but when I collide 2 actors now, after the first collision or so none of the contacts are the 2 actors involved in the contact; most are null.
Code:
public void OnSoftParticleCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
{
foreach(var contact in e.contacts)
{
if(contact.distance<0.01f)
{
var thisActor = m_solver.particleToActor[contact.bodyA]; // often null
var otherActor = m_solver.particleToActor[contact.bodyB]; // often null
...
world.colliderHandles doesn't seem to be right either. I was wondering, what is the correct way to get the 2 actors involved in a softbody/softbody collision now?
Thanks!
Matt