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.
Non-colliding rigid bodies
-
- Posts: 171
- Joined: Sun Jan 17, 2010 4:47 am
Re: Non-colliding rigid bodies
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):
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.
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: Select all
Ghost->setCollisionFlags(Ghost->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);
-
- Posts: 4
- Joined: Wed Jul 13, 2011 9:24 am
Re: Non-colliding rigid bodies
I will try that. Thank you.