Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting actors from bodyA and bodyB in Obi 6.0?
#1
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. 

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
Reply


Messages In This Thread
Getting actors from bodyA and bodyB in Obi 6.0? - by MattS - 12-02-2021, 10:54 PM