Hey guys,
I've got probably a simple problem but can't seem to find out where it lies.
I have an array of btBvhTriangleMeshShapes but they don't appear to be colliding/rebounding off one another. Gravity seems to work fine, they just don't want to run into eachother on the way down. Any pointers?
btBvhTriangleMesh not colliding
-
- Posts: 456
- Joined: Tue Dec 25, 2007 1:06 pm
Re: btBvhTriangleMesh not colliding
AFAIK btBvhTriangleMeshShapes are designed for static/kinematic objects.
If you need to detect collisions between two concave meshes you should probably try using dynamic bodies and btGImpactMeshShapes or btCompoundShapes.
If you need to detect collisions between two concave meshes you should probably try using dynamic bodies and btGImpactMeshShapes or btCompoundShapes.
-
- Posts: 8
- Joined: Fri Dec 17, 2010 3:24 am
Re: btBvhTriangleMesh not colliding
They are static shapes but they're in a 2d plane, which is the only reason I could see they're not rebounding into one another.
-
- Posts: 8
- Joined: Fri Dec 17, 2010 3:24 am
Re: btBvhTriangleMesh not colliding
Any suggestions?
Can I use btBvhTriangleMeshShapes on purely 2d objects?
Can I use btBvhTriangleMeshShapes on purely 2d objects?
-
- Posts: 456
- Joined: Tue Dec 25, 2007 1:06 pm
Re: btBvhTriangleMesh not colliding
Well, if you're going to make a pure 2d simulation, maybe using other libraries would help (e.g.http://www.box2d.org/).
As far as Bullet is concerned:
Aside from this, static objects in Bullet can't collide with each other, so you should use them only for "background" and use GImpactMeshShapes or btCompoundShapes for the (concave) moving ones (as far as I know in Bullet there is no btBvhTriangleMeshShape vs btBvhTriangleMeshShape collision algorithm, but I may be wrong).
I don't think that btBvhTriangleMeshShapes can't be used in 2d (they should work at the triangle level, so the only problem should only be easy tunnelling).
That's all I know about it.
As far as Bullet is concerned:
Well the main problem of completely flat shapes if that tunnelling is very easy (but I guess your 2d simulation won't allow objects to go in that direction...).Cetra wrote:Can I use btBvhTriangleMeshShapes on purely 2d objects?
They are static shapes but they're in a 2d plane, which is the only reason I could see they're not rebounding into one another.
Aside from this, static objects in Bullet can't collide with each other, so you should use them only for "background" and use GImpactMeshShapes or btCompoundShapes for the (concave) moving ones (as far as I know in Bullet there is no btBvhTriangleMeshShape vs btBvhTriangleMeshShape collision algorithm, but I may be wrong).
I don't think that btBvhTriangleMeshShapes can't be used in 2d (they should work at the triangle level, so the only problem should only be easy tunnelling).
That's all I know about it.
-
- Posts: 8
- Joined: Fri Dec 17, 2010 3:24 am
Re: btBvhTriangleMesh not colliding
I've tried the other libraries, but It's eventually going to be a hybrid 2d/3d environment (2.5d ish type).Flix wrote:Well, if you're going to make a pure 2d simulation, maybe using other libraries would help (e.g.http://www.box2d.org/).
I should have looked through the FAQ, I feel silly, as I knew this problem was. Thanks for your helpFlix wrote:Aside from this, static objects in Bullet can't collide with each other, so you should use them only for "background" and use GImpactMeshShapes or btCompoundShapes for the (concave) moving ones (as far as I know in Bullet there is no btBvhTriangleMeshShape vs btBvhTriangleMeshShape collision algorithm, but I may be wrong).
