Bullet convex in ODE
-
- Posts: 3
- Joined: Wed Dec 07, 2005 1:13 pm
Bullet convex in ODE
I've compiled ODE that was in here: bulletode_trimesh_src.zip to get convex support but my convexes don't collide with the ground nor with trimesh, but they collide with boxes and with other convexes. Maybe I need to #define something before I compililing it? Maybe it has something to do with that when I create a dynamic (moving) trimesh it also doesn't collide with the ground?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Apparently the demo adds the uninitialized vertices to the convex shape!
You can fix this by replacing test_convex_trimesh.cpp line 283 from
into
Thanks for the bug report, and please tell if this fixes the convex-mesh.
Erwin
You can fix this by replacing test_convex_trimesh.cpp line 283 from
Code: Select all
for (int k=0;k<VertexCount;k++)
Code: Select all
for (int k=0;k<ConvexVertexCount;k++)
Thanks for the bug report, and please tell if this fixes the convex-mesh.
Erwin
-
- Posts: 3
- Joined: Wed Dec 07, 2005 1:13 pm
Well I am glad that I did a bug repport but actually my test was using only cones/cylinders... I said convex because as much as I understand the cone/cylinder shape is converted to convex hull and passed to ODE in this form... And actually I didn't even compiled the ODE tests because I already have my own testsuit. I just replaced the .dll with the one compiled with bullet (I also added few C wrappers to it because I am using D (http://www.digitalmars.com/d) and is not compatible with C++ unlike C). I am going to compile the tests now and see what happens.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
When using Bullet's GJK with ODE, it will use the actual cone and cylinder, box and sphere. No conversion will happen for shapes using 'dCreateConvex'. The dxConvex encapsulates the different types and keeps a pointer to the actual GJK shape.Well I am glad that I did a bug repport but actually my test was using only cones/cylinders... I said convex because as much as I understand the cone/cylinder shape is converted to convex hull and passed to ODE in this form...
Collisions involving dxConvex are all handled by GJK, even for the trimesh. It just passes the contact points to ODE.
Erwin
-
- Posts: 3
- Joined: Wed Dec 07, 2005 1:13 pm
I wasnt able to compile the examples using dll. When I compile them staticly linked they work as expected. So still when I use bullet shapes they don't collide with the ground or with trimeshes of ODE. The only difference I can see from the examples is that I am using ODE as dll... It is strange to me because they collide with everything else... Hopefully I will solve this in future because Bullet+ODE is cool. By the way any chance to use continuous physics in ODE via Bullet?