CodeMatias / bullet-old

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

Potential collision callback events #653

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=7739&hilit=gContactDe
stroyedCallback

This post seems to have nice solution to emit collision start/end events. May 
be Erwin as author could provide some comments on this method?

Thanks.

Original issue reported on code.google.com by opengen...@gmail.com on 25 Sep 2012 at 1:55

GoogleCodeExporter commented 8 years ago
should be type-Enhancement of course

Original comment by opengen...@gmail.com on 25 Sep 2012 at 2:01

GoogleCodeExporter commented 8 years ago
It looks like a good solution, I'll have a look.

Original comment by erwin.coumans on 25 Sep 2012 at 11:05

GoogleCodeExporter commented 8 years ago
added one fix to catch all "end collision" events to btPersistentManifold.h:
    SIMD_FORCE_INLINE   void    clearManifold()
    {
        int i;
        for (i=0;i<m_cachedPoints;i++)
        {
            clearUserCache(m_pointCache[i]);
        }

        if(gCollisionEndedCallback && m_cachedPoints)
        {
            gCollisionEndedCallback(this);
        }

        m_cachedPoints = 0;
    }

Original comment by opengen...@gmail.com on 29 Sep 2012 at 9:34

GoogleCodeExporter commented 8 years ago
See https://github.com/bulletphysics/bullet3/issues/120

Original comment by erwin.coumans on 30 Mar 2014 at 7:25