Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Jul 16, 2011 3:46 am 
Offline

Joined: Wed Jul 13, 2011 9:24 am
Posts: 4
My question is fair simple. How do I make rigidbodies that don't collide at all? i want to apply force and other things related to rigidbodies but I want them to totally ignore collisions. How can I do such thing?

EDIT: shortly after I wrote this post, I found a btEmptyShape - would that be the answer?

Thanks.


Top
 Profile  
 
PostPosted: Sat Jul 16, 2011 4:01 am 
Offline

Joined: Sun Jan 17, 2010 4:47 am
Posts: 143
No, using the shape will cause there to be an overflow in the objects AABB calculation, and then bullet will remove it from the simulation. At least...thats what happened the last time I tried it. You want to look at collision flags on the btCollisionObject base class:

http://bulletphysics.com/Bullet/BulletF ... bject.html

Look at the enums near the top, in particular "CF_NO_CONTACT_RESPONSE". Get the existing flags and add that flag to it, and then pass it in to "SetCollisionFlags(int)". Should look something like this(taken from my trigger object code):

Code:
Ghost->setCollisionFlags(Ghost->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);


In some cases people have reported that not having any effect, which I'm not sure what that is about...I've never had issues. Good luck.


Top
 Profile  
 
PostPosted: Sat Jul 16, 2011 4:08 am 
Offline

Joined: Wed Jul 13, 2011 9:24 am
Posts: 4
I will try that. Thank you.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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