Jump to content

TriMesh shape like in Ode


Recommended Posts

Hello,
I would like to know if there is a way to do a trimesh shape like in open dynamic engine, because for some object the convexhull is not appropriate ?
I search how to get proper collision when I have two parallel walls in the same surface group because the convexHull join the vertexs of the two wall and there is no possibility to get proper collision between the two walls.
If you have any idea how to achieve this thanks.

Link to comment

My problem is visible on this image.
I have for exemple one house with two wall in same group that provide by a cad software.
I need proper collision between two wall with an object a table or chair or other.
I don't know how to achieve this properly without a trimesh system in the physic engine ?

EDIT:I need collision like the second image

ShapeConvex.png

CollisionTris.png

Edited by fabre.cedric
Link to comment

Hello,

By default, the editor cannot automatically create such shapes. As a solution, you can use the creation of convex shapes for each part of the mesh. Sample code for such creation is in the attachment. Place the composite_shape property on the required objects in the editor, and then call generateCompositeShapes() in AppWorldLogic ::init(). After that, the composite shapes for the objects are saved in the world. In property, you can select two body types and configure the convex generation error. This code only works with ObjectMeshStatic and ObjectMeshDynamic.

composite_shape.prop ShapeGenerator.h

  • Like 2
Link to comment
×
×
  • Create New...