Hey everyone, I’m currently working on my own voxel game. Voxels are implemented using an instanced static mesh. However, it can’t simulate physics on its own. I basically solved this by creating a root static mesh, enabling physics on it, disabling collision, setting the weight to a minimum (0.001), and simply attach the ISM to it. Until recently, this worked fine, but now I’ve started working on destructibility. A problem has arisen: if I have voxels far from the Actor’s center, the physics start to break because the weight and leverage are large enough to affect this small chunk of voxels. Yes, I shifted the root mesh center of mass to the center of the voxels, and they balance out, but the physics itself still behaves oddly. If this voxel is at the Actor’s center, it behaves normally, but with this offset, it can roll, stop on the edge, shake, or fly away from the slightest touch.
Honestly, I don’t know how to fix this. I could offset the Actor by the voxel’s position and offset the voxel in the opposite direction, which would effectively center the voxel on the Actor without moving it relative to the world. But that would significantly complicate the in-game logic and the binding of objects or effects to a specific voxel.