Search Unity

The Locomotion System for Unity has previously been briefly mentioned on this blog, but this post will go more in depth with what exactly it can do to bring more life to your animated characters.

The Locomotion System is all about making walking and running in games look better and more believable without requiring dozens of animations. The system automatically blends your keyframed or motion-captured walk and run cycles and then adjusts the movements of the bones in the legs to ensure that the feet step correctly on the ground. The Locomotion System is available for free when used in a Unity game.

Video Introduction

The best way to understand what the Locomotion System is all about is by watching a short introduction to it:

[vimeo clip_id=”5391896″ width=”480″ height=”360″]

The Locomotion System was also presented at last year’s Unite conference:

[vimeo clip_id=”5391780″ width=”500″ height=”282″]

Besides the Unite conference presentation, the Locomotion System was also presented at GDC 2009 in a fully packed session.

Recently it has been used in the online game Robin Hood Showdown accompanying BBC’s popular television series. The system allowed the characters in the game to run in arbitrary directions while aiming against the player, while still keeping the number of used animations down, thus helping keeping the web-player size small.

Like Unity itself, the Locomotion System has been designed to be highly flexible, while still being painless to use:

Automatic Adjustment to Uneven Terrain
You want your character to walk on hills, on stairs, over rocks and debris and other small obstacles? No problem. Need your character to face in one direction (let’s say, aiming at something) while walking in another arbitrary direction? Done; no extra work involved. The Locomotion System can automatically adjust animations made for a specific speed and direction on a plain surface to any speed, direction, and curvature, on any surface, including arbitrary steps and slopes.

Full Control of Style
Animators are experts in creating motions with specific styles and personalities. The Locomotion System uses keyframed or motion-captured animations as input and only adjusts them minimally to move the feet correctly in a dynamic and detailed environment.

Full Control of Behavior
Move your character around by any means you desire, be it a CharacterController, a RigidBody, or your own custom movement logic. The Locomotion System simply observes the position, alignment, velocity and rotational velocity of your character and deduces everything from that, along with some raycasts onto the ground. This means the system can be used equally well for player avatars and for AI characters; for third person control, point-and-click control, scripted movement paths, or whatever control scheme you need.

Use With Any Legged Character
The Locomotion System is not just for animating humans. It can be used for just about any character with legs, and indeed the project folder comes with a human, a heron, and a coyote. As can be seen in the videos above the system has also been tested with a bear and a wolf. Give me a holler if you try out the Locomotion System with an animated spider. I didn’t have a spider model myself for testing, but I sure want to see it in action! (Actually, give me a holler no matter what you use the Locomotion System for – I’m interested in seeing where people take it.)

Simple Automagic Setup
If you think that all this advanced tech is complicated or cumbersome to use, you’d be wrong! The Locomotion System features a fully automated motion analyzer that analyzes all the provided animations and figures out the velocity of each and well as the times that the feet lift off the ground and land, and lots of other data that it uses at runtime. All it needs from you is a little help with pointing out which bones constitutes the different legs, and a few other simple details. It can all be specified using drag-and-drop and typing in a few values. No scripting required!

Indie Budget Compatible
Big game studios these days are able to create quite realistic walking and running on uneven terrain, but it typically requires hundreds of animations to pull it off. The Locomotion System takes a different approach and attempt to do much with little. Even with just an idle animation and one walk cycle, you still get walking on any uneven terrain and in arbitrary directions, including turning. You can supply more animations too, if you want, and then the produced motion will look even better. One user used walking and running in 8 directions each, and it looked great. So supply as few or as many animations as you like, and the Locomotion System will take what you have and make the best of it. How’s that for Indie friendly? Oh, and did I mention that the Locomotion System itself is completely free to use in Unity games?

Try For Youreself!
You can take the Locomotion System for a spin yourself, right here! Watch the automatic demo mode or take control yourself. There’s a bunch of visualization options too! Just click the image to load the web-player.
[WP_UnityObject altimage=”” src=”” width=”640″ height=”480″ css=”” /]

Press the Auto-Demo “Off” button to take control yourself. Move the character with the keyboard arrow keys. Optionally, the facing direction can be controlled with the W, A, S, D keys. Hold down shift to walk instead of run. Use + and – keys to speed up or slow down time.

Alternatively, with a game pad, such as an XBox 360 controller, the direction and speed can be controlled precisely with ease, while independently controlling facing direction with the secondary stick.

Download the Locomotion System yourself and see if it might add some extra life to your animated characters!

3 replies on “Focus: The Locomotion System”

I just wonder if I can make it work in a vertical scroller where the *scenario* is moving, not the player. Well, soon I’ll find out, hope I can find a way to do this work even if I have to change the code a bit – that, of course, supposing I can understand its all-mightiness to start with heh :)

Comments are closed.