This provides a couple different types of player movement...camera relative(keyboard or gamepad modes only...for Splinter Cell style satellite camera movement) and character relative. It also can be used with either a gamepad, keyboard only, or a mouse/keyboard combo. It also smoothly blends the player's bones animation states between one another. In other words, the transition from a standing animation to a run is smooth and not sudden. It's coded to handle idle, stand, walk, run, left turn, and right turn. It also plays a footstep sound for both walking and running.

Note that there is no camera provided, although it does require the default "camera" when using camera relative modes.

The various sensitivities, keyboard assignments, and the movement type(gamepad, keyboard, mouse/keyboard, camera/character relative) should be changed in the the "loadControlsDefault" function and not with the VAR itself. This function is the first thing that gets called, and all of the default values are handled within it. It then calls the "setKeys" function which uses "miscinput.wdl". The "hit.wav" from one of the template folders is also used as a placeholder for the footstep sounds. Make sure it is in your project folder or in your path somewhere.

This is somewhat complicated looking, but it really isn't if you understand your C-script. There's a simple player action at the end to demonstrate how to call these functions. Sorry for the minimal comments, but you shouldn't have too much trouble figuring it out. There's quite a bit of commented out code in a couple of the functions. I'm not using that, for now, but you can do whatever you want with it. I don't know if uncommenting it will break the system, though.

Credit to Pappenheimer/Gnometech for the environment/calculating functions. I've modified/simplified it a bit, but the soul of their work is still there. Credit to whoever helped me on the blending/animation function. Credit to Doug for the misc input file. It's required to set up/assign controls/keys.

Get the code below and read on further into this thread for usage instructions and updates/progress log:

http://www.geocities.com/hainesrs/blending.zip
http://www.geocities.com/hainesrs/blending.rar - same thing, just half the file size.

Last edited by Nadester; 08/17/06 23:12.

My User Contributions master list - my initial post links are down but scroll down page to find list to active links