I want to be able to use collision detection from bullet for game mechanics purposes (as in trigger hitting, zone entering...)
I am also going to be using the Dynamics for rigid body simulation..
I checked the "appCollisionInterfaceDemo" project and it seems a very reasonable but only in case I have no dynamics. There's some redundancy otherwise when using the dynamics as I'd start creating collision objects (can I share?) to both the collision world and to the dynamics world..
I thought I'd drop the collision world and handle everything from the dynamics: Make the non-dynamic objects (like triggers, zones...) kinematic and check for collisions from the dynamics world: does seem icky and I still don't quite understand how to stop those objects from affecting other dynamic stuff within the simulation..
I hope it's clear, I really need help on this one as physics is my responsibility on the team..
Again thnx in advance
Collision Detection seperated from Dynamics
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Collision Detection seperated from Dynamics
You should be able to just use a single btDiscreteDynamicsWorld (which is derived from btCollisionWorld).
Just make sure to disable collision response for triggers, set the collision filter flags for triggers to CF_NO_CONTACT_RESPONSE.
body->setCollisionFlags( body->getCollisionFlags() | CF_NO_CONTACT_RESPONSE);
Hope this helps,
Erwin
Just make sure to disable collision response for triggers, set the collision filter flags for triggers to CF_NO_CONTACT_RESPONSE.
body->setCollisionFlags( body->getCollisionFlags() | CF_NO_CONTACT_RESPONSE);
Hope this helps,
Erwin
-
- Posts: 3
- Joined: Mon Jun 09, 2008 8:30 pm
Re: Collision Detection seperated from Dynamics
It does help
One last thing: Is it ok to mix addCollisionObject and addRigidBody?
One last thing: Is it ok to mix addCollisionObject and addRigidBody?