Hi all, I've been trying to get soft body like effect as gish within Box2D. I have managed it using boris springs but the structure is wildly unstable with the springs components.
I am starting this thread for people to put around some theory on what might be a very simple way to simulate soft bodies. All I am looking for is a simple squishy ball.
Some ideas to get us started: How about the pressure model combined with a simple circle of balls connected by a revolute joint for each?
Thank you very much, you're a star 🙂
ewjordan,
I only need to convert BlobTest2.java and ConstantVolume.Joint.as?
Will the new joints automatically be updated by the engine or do I need to call an Update() routine somewhere? I am just wondering if it'll update naturally each world.step?
You'll need to make the joint def as well, and if you've got all that, then it should integrate automatically - joints are all solved the same way internally, so this basically just has to implement the right interface and it should work (it's a lot easier than creating new shapes). Follow more or less the way the other joints are done in AS3 if you have any trouble, there might be some subtle differences that I don't know about (I don't know the internals of the AS3 engine very well).
Nope, there shouldn't be any major differences. The only major difference between AS3 and C++ is the occasional pass-by-reference, but that's not going to be a problem when coming from java. If you do port this, you should then submit it to the SVN repository.
FWIW, now that the distance joints can be "soft," you could also use those instead of that spring force code, it might have better stability for stiff springs (if that's what you need). When I originally posted that code, there was no soft distance joint yet.