Ghost Objects or Rigib Bodies?

Post Reply
Boltzmann
Posts: 9
Joined: Wed Mar 07, 2012 6:07 pm

Ghost Objects or Rigib Bodies?

Post by Boltzmann »

Hello,

I want to create objects that don't collide with eachother but at the same time have a collision detection, so that I can use collision callbacks. What's the difference between having a GhostObject with collision flag CF_NO_CONTACT_RESPONSE and a RigidBody with that same flag? And also, what if I want 2 balls to collide with the walls and floor in a room, but not with eachother?

Thank you
Karrok
Posts: 65
Joined: Fri May 13, 2011 1:11 pm

Re: Ghost Objects or Rigib Bodies?

Post by Karrok »

ghost objects retain their own contact manifold, whereas non-ghost objects have their contact information in the default contact manifold.
roberts
Posts: 5
Joined: Fri Mar 16, 2012 6:21 pm

Re: Ghost Objects or Rigib Bodies?

Post by roberts »

Karrok wrote:ghost objects retain their own contact manifold, whereas non-ghost objects have their contact information in the default contact manifold.
I don't even know how to interpret that. Could you elaborate, please.
Boltzmann
Posts: 9
Joined: Wed Mar 07, 2012 6:07 pm

Re: Ghost Objects or Rigib Bodies?

Post by Boltzmann »

So if my objects are Ghosts, will they still have normal RigidBody collision reactions made in bullet?

And would I be able to test if they're colliding with another object? I coded a working callback to get collision events but I want to be able to also know when the collision stops (ie, when two objects that were colliding move away from each other)
roberts
Posts: 5
Joined: Fri Mar 16, 2012 6:21 pm

Re: Ghost Objects or Rigib Bodies?

Post by roberts »

but I want to be able to also know when the collision stops (ie, when two objects that were colliding move away from each other)
Couldn't you just do a dot product on their directional vectors to determine that?
Boltzmann
Posts: 9
Joined: Wed Mar 07, 2012 6:07 pm

Re: Ghost Objects or Rigib Bodies?

Post by Boltzmann »

You mean they're orientation? So they only collide if the dot product is positive? That would work if you had a car bumping into another car from behind, what about front to front?

I dont think that is the solution.
Post Reply