FallingSandJava
FallingSandJava copied to clipboard
A desperate plea for help regarding the Box2D integration
Hi, inspired by your video as well as Noita and other projects, I have been working on my own falling sand engine in C# for a few months. I've got Box2D full integrated, but I've run into the "holes" issue you described here, but I'm struggling with a different problem than you were.
See this video: https://streamable.com/jeyklj
The order of operations I am performing is...
- Place the pixels from all Box2D components into the main pixel matrix
- Run the pixel matrix simulation
- Remove all Box2D component pixels from the main pixel matrix and put them back into their respective components
Rather than just ending up with holes when the objects are rotated, it's like the holes appear and then continue to appear as it rotates further, leading to the pixels in the Box2D components just being erased entirely.
I know this repo hasn't been updated in a couple of years, I'm really just hoping you see this and are able to offer some insight, as I've been dealing with this problem for a few weeks now and I'm getting desperate!
Thanks!