How to stop bones from clipping through objects during animations?

I never made any more progress on this unfortunately.

I had a few ideas to try out using Minie’s DynamicAnimControl but didn’t feel confident enough that my ideas would work and look good enough to justify working on this instead other things at the time.

I had two general ideas I was going to start with though:

The first idea I have is to do a completely procedural walk animation with code for the legs where I’d try using the setDynamic() method in the DAC to guide the feet up and down in an elliptical shape and hopefully it would look like walking when the feet collide with the ground, but I had a hunch that I probably would not be able to do this well without spending a lot of time tweaking things with trial and error. I also have lots of different animals in my game with 4 legs and slightly different walk cycles, so trying to make a clean procedural walk animation for all of my unique animated models could be difficult and time consuming; or maybe not, I haven’t attempted anything so I’m just speculating still.

And the second Idea I had (that I expect would be easier if its even possible) was to try something where I let the legs play their normal walk animation, and then if the feet or legs clip through something (like sloping ground or stairs) then I would just reposition the joints upwards at the Y level of the collided object. It sounds easy enough, but I expect the results could also end up real sloppy and buggy and could look nothing like what I expect, depending on how the AnimComposer responds when a joint gets its transform manually adjusted in the middle of an animation.

If I get around to this anytime soon and make any substantial progress I’ll post back with more information. Although I am still interested to hear if anyone else has any other ideas / insights, or if anyone else makes any progress on this in the mean time.

2 Likes