How to use the btCollisionObject::m_collisionFlags ?

sssa2000
Posts: 12
Joined: Thu Oct 26, 2006 8:36 am

How to use the btCollisionObject::m_collisionFlags ?

Post by sssa2000 »

i think this flag is set the object whether or not be collision.
but i have no idea that how to set the flag.

for example,i have 3 object,i want object1 can not collision with object2,
but object1 can collision object3, how can i set the flag?

thanks!
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: How to use the btCollisionObject::m_collisionFlags ?

Post by Erwin Coumans »

For now, please try using collisionFilterGroup/collisionFilterMask, or override the virtual 'needsCollision' in your derived version of btCollisionDispatcher.
See http://continuousphysics.com/Bullet/php ... .php?t=712

I plan on adding a 'nearCollisionCallback', for better control.
Thanks for the feedback,
Erwin

sssa2000 wrote:i think this flag is set the object whether or not be collision.
but i have no idea that how to set the flag.

for example,i have 3 object,i want object1 can not collision with object2,
but object1 can collision object3, how can i set the flag?

thanks!
sssa2000
Posts: 12
Joined: Thu Oct 26, 2006 8:36 am

Re: How to use the btCollisionObject::m_collisionFlags ?

Post by sssa2000 »

Erwin Coumans wrote: I plan on adding a 'nearCollisionCallback', for better control.
Thanks for the feedback,
Erwin

that is really good , if the nearCollisionCallback is add to Bullet,
i am very look forward to that!
thanks!