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
Ghost Objects or Rigib Bodies?
-
- Posts: 65
- Joined: Fri May 13, 2011 1:11 pm
Re: Ghost Objects or Rigib Bodies?
ghost objects retain their own contact manifold, whereas non-ghost objects have their contact information in the default contact manifold.
-
- Posts: 5
- Joined: Fri Mar 16, 2012 6:21 pm
Re: Ghost Objects or Rigib Bodies?
I don't even know how to interpret that. Could you elaborate, please.Karrok wrote:ghost objects retain their own contact manifold, whereas non-ghost objects have their contact information in the default contact manifold.
-
- Posts: 9
- Joined: Wed Mar 07, 2012 6:07 pm
Re: Ghost Objects or Rigib Bodies?
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)
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)
-
- Posts: 5
- Joined: Fri Mar 16, 2012 6:21 pm
Re: Ghost Objects or Rigib Bodies?
Couldn't you just do a dot product on their directional vectors to determine that?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)
-
- Posts: 9
- Joined: Wed Mar 07, 2012 6:07 pm
Re: Ghost Objects or Rigib Bodies?
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.
I dont think that is the solution.