I'm working in some examples using Box2D and OpenCV. My question is related to the best way to create a custom shape coming from OpenCV contour.
I already resolved how to find the triangles of the shape using Delaunay. Then the first question is, how to update the custom shape because the triangles are always changing? My first attempt was to create the Box2D shape in one cycle and delete it the next cycle, however, it is not stable, it gives me java.lang.AssertionError. Is there a way to just update the custom shape instead of creating and erasing every two cycles?
I'm working in some examples using Box2D and OpenCV. My question is related to the best way to create a custom shape coming from OpenCV contour.
I already resolved how to find the triangles of the shape using Delaunay. Then the first question is, how to update the custom shape because the triangles are always changing? My first attempt was to create the Box2D shape in one cycle and delete it the next cycle, however, it is not stable, it gives me java.lang.AssertionError. Is there a way to just update the custom shape instead of creating and erasing every two cycles?