Closed petrasvestartas closed 6 years ago
The ConcaveConvexCastDemo does exactly this. https://github.com/AndresTraks/BulletSharpPInvoke/blob/master/BulletSharp/demos/ConcaveConvexCastDemo/ConcaveConvexCastDemo.cs
The main point is to use a BvhTriangleMeshShape with a TriangleIndexVertexArray and when you update the shape, you overwrite the vertex array, recalculate the bounding box for the shape and clear collision pairs between the ground object and other objects.
The animation should be slow enough and the ground triangles small enough so that the other objects (boxes) don't fall through and the simulation remains stable.
What in this example ConvexcastBatch class does?
It is not the landscape animation it is those cubes connected with rays?
The landscape is animated in that demo.
I would like to animate one of rigid bodies.
I basically would like to create a wavy mesh and change its z coordinate overtime
The on that landscape add some ordinary rigid bodies like cubes.
What would be a way to change a rigid body? Would I need to remove each iteration a rigid body and add new one? Or it is possible to manipulate vertex coordinates?