Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Mar 24, 2012 1:26 pm 
Offline

Joined: Sun Jan 29, 2012 10:01 pm
Posts: 49
When I have made a hole in a height field, I activate all rigid bodies in the area but they are still sleeping in the air for about 1 second before they fall down or go back to sleep in the air. They claim to be active directly when I have activated them but they don't fall down instantly. I use Bullet 2.79.


Top
 Profile  
 
PostPosted: Thu Mar 29, 2012 5:17 pm 
Offline

Joined: Sun Jan 29, 2012 10:01 pm
Posts: 49
When I run into a mountain from the side and make a hole in it, the vehicle behave as if there was no hole until it has moved around a bit. Reversing and going forward again makes the collision update according to the height field and let the vehicle pass without a collision.


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 3:45 pm 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3744
Location: California, USA
It could be that contact points are not updated because you changed the collision shape. If you modify collision shapes, the best way is to remove the objects first, then make the modification, and re-insert it into the world.

Alternatively, you can manually flush the contact points for a given object using an API call, for example:
Code:
world->getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(object->getBroadphaseHandle(),world->getDispatcher());


Top
 Profile  
 
PostPosted: Sun Apr 01, 2012 3:32 pm 
Offline

Joined: Sun Jan 29, 2012 10:01 pm
Posts: 49
Thanks, I will try flushing whenever a collision shape has been modified.

Edit:
Both methods worked fine. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group