fabre.cedric Posted May 21, 2021 Posted May 21, 2021 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.
silent Posted May 21, 2021 Posted May 21, 2021 Hi Fabre, Do you have an example video / screenshot of this behavior? As far as I understand you can simply use 2 box shapes that you will place manually where walls are located. Or you need to solve different task? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
fabre.cedric Posted May 21, 2021 Author Posted May 21, 2021 (edited) 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 Edited May 21, 2021 by fabre.cedric
silent Posted May 21, 2021 Posted May 21, 2021 Can you send us example mesh file from the screenshots? How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
fabre.cedric Posted May 21, 2021 Author Posted May 21, 2021 Yes of course this is a simple test object Test.obj
karpych11 Posted May 24, 2021 Posted May 24, 2021 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 2
fabre.cedric Posted May 25, 2021 Author Posted May 25, 2021 Hi karpych11, I'll try that. Thanks for the solution !
Recommended Posts