Blender Python Walking Script

This is a little scripting project I started in the summer of 2010 for Blender’s internal Python API (What is blender? Go to I wrote the script for Blender 2.49’s python API- so until I get around to rewriting it for the new Blender 2.5 API, it will remain obsolete. However I continue to refine it when I have the time.

Essentially, the purpose of this script is to eliminate the slippery/glitchy feet that are so common in video games. These unsightly results usually stem from the use of pre-animated movements which sloppily interpolate between each other. Using the internal game engine of Blender, I have allowed the feet to make arbitrary movements (determined on the fly). When a foot is planted on the ground, it sticks there. After the weight of the sprite shifts, the planted foot rises from the ground and finds a new resting place. Each “foot print” is determined by the height of the terrain, and the foot’s distance from the body. In addition, the feet rotate to fit slanted and bumpy ground. There is also a little experimental string of code which attempts to increase the speed of this process as the speed of the sprite increases (while going down hill perhaps).

This setup produces altogether more natural and organic movements than is typically seen in games. Unfortunately, at the moment the rig is a bit too cumbersome to release. Until I make it a little more user friendly (and compatible with Blender 2.5), I won’t be able to post any demos. So far, I’ve only applied the script to a couple of crude models, but they will suffice for this simple exhibition. My main goal is to get rid of all the logic bricks. The more I use them, the more I dislike them. I’m finding more and more that it’s just plain easier to script out exactly what I want, instead of tangling up hundreds of messy bricks.

Below are a few screen shots of the rig in action.

This slideshow requires JavaScript.

  1. Anonymous
    March 2, 2012 at 1:11 pm


    Great work. Is there any chance that I could use your script for walking?
    Where could I find it?


  1. June 1, 2011 at 10:30 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: