Panda Bullet

I have implemented a the new, alternate collision filtering. You can choose which collision filter algorithm you ant to use via the “bullet-filter-algorithm” config variable:

(1) “mask”
The old algorithm. It simply compares the collision masks of two nodes.

Consider the collision mask as membership with collision groups. There are 32 groups (0…31), and each bit set in the mask means you are member of the accoring group.

Two objects collide if they both belong to at least one group in common.

(2) “group-mask”
The new one. Again the collision mask can be considered as membership with collision groups. In addition to setting the group mask for each node you have to define which groups collide with which other group. You can setup this collision matrix with

world.setGroupCollisionFlag(g1, g2, flag)

By default each group collides only with objects from it’s own group. The matrix is an identity matrix.

You don’t have to pay attention to keep the matrix symetrical - I do it interal.

The samples.zip have been amended with a sample showing usage of the new collision algorithm. Please refer to the very first post in this thread.