Ghost objects and constraints

Post Reply
maiklof
Posts: 17
Joined: Wed Nov 20, 2013 10:01 am

Ghost objects and constraints

Post by maiklof » Thu Oct 29, 2015 8:27 pm

Hi,
I have a working simulation environment where I have some rigid bodies (static and dynamic) and some ghost objects (PairCaching). The idea is that the ghost objects are used to detect some of the dynamic objects (like sensors) but without colliding (Flag->NO_CONTACT_RESPONSE). To complicate the system, some of the ghost objects can be "attached" to some dynamic objects and move with them.
At the moment I am handling this last part by myself. I mean, when I get an update in the transform of the dynamic object using a custom motion state, I calculate the new position of the attached ghost object and I update the transform in bullet. It works perfectly!
But, I was thinking to make bullet handle these moving ghost objects by himself, really attaching them to the dynamic objects. I thought to use constraints to lock the ghosts to the dynamic objects, but I do not think it is possible. And I do not think it will help, because ghost objects do not have motion states and I would not get the updated position to visualize the objects when it moves.
Any idea how to do it? Maybe I am approaching the problem completely wrong and there is an easier way...
Hope you understand the problem! And thank you in advance!
//Mikel

Post Reply