Edit: solved
Hi, I'm new here, I've been having problems with the btBvhTriangleMeshShape. I've been able to swap it out for a btBoxShape and that works as expected(see commented line) and the character controller works with it too, pushing boxes around. But I can't get anything to collide with the btBvhTriangleMeshShape, even though I've only been using example code.
Also I've used meshes from working demos, so I'm sure it's not the data I'm using.
Setting up my world:
<this was fine>
Adding rigid bodies:
<solved: I was able to work around this by using a btTriangleIndexVertexArray instead of btTriangleMeshShape->addTriangle().>
When I used a btGImpactMeshShape I was calling updateBound() with no luck. Also I've tried generating a heightmap because I thought the mesh might have been rotated incorrectly. I then tried a terrain mesh with all its polygons duplicated upside down, but still no collisions. I'm 100% sure irrlicht is using the same scale as bullet.
This is my code for adding a box:
<this was fine>
Please help
[Solved]No collisions with btBvhTriangleMeshShape
-
- Posts: 18
- Joined: Sun Mar 29, 2009 5:00 pm
[Solved]No collisions with btBvhTriangleMeshShape
Last edited by Sorlaize on Sat Apr 04, 2009 8:45 pm, edited 2 times in total.
-
- Posts: 18
- Joined: Sun Mar 29, 2009 5:00 pm
Re: No collisions with btBvhTriangleMeshShape
Forgot to add- using the latest version of bullet from the svn.
-
- Posts: 18
- Joined: Sun Mar 29, 2009 5:00 pm
Re: No collisions with btBvhTriangleMeshShape
Tried adding these collision masks everywhere, but it didn't help: btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_KINEMATIC_OBJECT
I will try checking for the number of collisions to see if it changes.
I will try checking for the number of collisions to see if it changes.
-
- Posts: 11
- Joined: Fri Mar 20, 2009 11:11 am
Re: No collisions with btBvhTriangleMeshShape
See my previous self answered thread here:
http://www.bulletphysics.com/Bullet/php ... f=9&t=3381
Hope that helps
http://www.bulletphysics.com/Bullet/php ... f=9&t=3381
Hope that helps
-
- Posts: 18
- Joined: Sun Mar 29, 2009 5:00 pm
Re: No collisions with btBvhTriangleMeshShape
http://www.bulletphysics.com/Bullet/php ... 137#p13137
I thought static objects were just ones with no mass, is that right?
I'm going to confirm the vertices I pass in are the same as with the other working demos.
I thought static objects were just ones with no mass, is that right?
I'm going to confirm the vertices I pass in are the same as with the other working demos.
-
- Posts: 18
- Joined: Sun Mar 29, 2009 5:00 pm
Re: No collisions with btBvhTriangleMeshShape
The vertex count was right and I was passing in triangles correctly as far as I can tell, but I haven't debugged it step-by-step so I can't be sure. I solved the issue by using the btTriangleIndexVertexArray to initialize the btBvhTriangleMeshShape instead, is this the recommended way?
Also- with some meshes the triangles that are culled are still used in collision detection, but not others. Is there anything I'd need to know about this when designing levels?
Thanks.
Also- with some meshes the triangles that are culled are still used in collision detection, but not others. Is there anything I'd need to know about this when designing levels?
Thanks.
-
- Posts: 1
- Joined: Mon May 18, 2009 5:18 pm
Re: [Solved]No collisions with btBvhTriangleMeshShape
this is an interesting discussion.. thank you for sharing
simulation rachat de credit
simulation rachat de credit