favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

no contacts detected between soft body / convex decomp anymore with trunk #512

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a collision between a soft body and a convex decomposition object
2. btSoftBody::m_rcontacts is always empty
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
rev. 2384

Please provide any additional information below.

I rolled back to rev 2338, and applied the patch I submitted (issue 502 & 501), 
and everything worked as expected.
so I suspect a change between 2338 & 2384 leads to the issue

Original issue reported on code.google.com by easyrid...@gmail.com on 5 May 2011 at 8:56

GoogleCodeExporter commented 9 years ago
I managed to track down the issue.

The issues comes from the following method:

    virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
    {
        /* t should be identity, but better be safe than...fast? */ 
        const btVector3 mins=m_body->m_bounds[0];
        const btVector3 maxs=m_body->m_bounds[1];
        const btVector3 crns[]={t*btVector3(mins.x(),mins.y(),mins.z()),
            t*btVector3(maxs.x(),mins.y(),mins.z()),
            t*btVector3(maxs.x(),maxs.y(),mins.z()),
            t*btVector3(mins.x(),maxs.y(),mins.z()),
            t*btVector3(mins.x(),mins.y(),maxs.z()),
            t*btVector3(maxs.x(),mins.y(),maxs.z()),
            t*btVector3(maxs.x(),maxs.y(),maxs.z()),
            t*btVector3(mins.x(),maxs.y(),maxs.z())};
        aabbMin=aabbMax=crns[0];
        for(int i=1;i<8;++i)
        {
            aabbMin.setMin(crns[i]);
            aabbMax.setMax(crns[i]);
        }
    }

which has been changed, in rev 2373, to:

    virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
    {
        /* t should be identity */ 
        aabbMin=m_body->m_bounds[0];
        aabbMax=m_body->m_bounds[1];
    }

So basically, rollbacking "btSoftBodyInternals.h" to its previous revision 
(2310) fixes the issue...

Original comment by easyrid...@gmail.com on 5 May 2011 at 11:41

GoogleCodeExporter commented 9 years ago
Good point, we need regression tests to avoid this in the future.
Fixed in trunk: http://code.google.com/p/bullet/source/detail?r=2396

Original comment by erwin.coumans on 11 May 2011 at 8:53

GoogleCodeExporter commented 9 years ago
great, thanks !

Original comment by easyrid...@gmail.com on 12 May 2011 at 6:40