GTA IV character movement?

(I chose GTA cuz it’s pretty well known :slight_smile: )
I’ve got the basic movement - walking, running, and jumping with fading transitions… (3, VC, SA in GTA world)

But is there any tutorial or something on how to make movement with animated transitions from idle to walking, from running to idle, walking to running, eventually leaning left and right when turning or even 180° turning animation when you go the opposite direction from one you’re facing…

Basically the same character movement as in GTA IV or any recent game…
I know it’s pretty complex and maybe nobody has done sth like this before, but is there any way to do it? or something even close to it?

Are you talking about velocity based animation?

Are you talking about velocity based animation?

i think he wants a smooth transition between walk & run, which could be done in Blender Game Engine. so when you have set up everything in the Game Logic (lets say W=walk and Shift+W=run) you should increase the blending value. by default it’s 0 so you have a hard transition between the walk and run cycle, but when you blending is set to 5-10 the animation will blend into the other, so you will have a smooth transtin between the 2 animations.

you can check out this youtube video. it shows the blending between standing (idle animaton) and walking. it’s a bit old but the game logic settings are still pretty much the same.
The interesting part starts at about 9:45 minutes.

No, no, I already have This kind of transition, I’m talking about a separate animation to fill out this transition, clearer example might be transition from running to idle, you don’t want your character to just instantly stop( even with the blending it’s kind of awkward) you want him to maybe make a few more steps before he stops and lean backwards a little bit to make it look good -> separate animation…
You know what I mean?

What you are describing sounds like a custom animation to move you from one looping animation to another. You should be able to handle that with more state information.

For example, the idle->start running->running animation. If you are in idle and you push your run button, then you change to a state that is ‘starting to run’. You play your custom animation and after that animation ends you move to the ‘running’ state and you just apply your normal run-loop.

The 180 degree turn works the same way. You know the direction you are running. When the user inputs a direction you check that against the current direction and if it is more than 120 degrees or so, you play your quick-turn animation and then go back into your run-loop.

Thanks! :slight_smile:
Thought it would be a bit more complex… I tried it many times before with no success…
This will hopefully work, I’ll definitely try it, thank you so much.

The concept is pretty simple. In practice, I think you will find that it significantly increases the number of states that your game objects can be in and causes a lot of duplication. The “starting to run” animation and state is almost the same as the “running” state.

Well, here is a simple option. You can make your “Slow/Stop” animation, then set up a separate logic brick with the same walk button, but press the “Invert” button on the keyboard sensor. So, then when you press the walk/run it plays normally, but when you let off the walk/run key, it plays the “Slow/Stop” animation.


…and causes a lot of duplication. The “starting to run” animation and state is almost the same as the “running” state.

And why does it matter? As long as it works it should be fine right?
(Haven’t tried it yet, preparing animations now…)

It is just a matter of code/logicbrick complexity. As you add more complex things like this it becomes harder to find bugs, longer to change/fix things, more difficult to understand etc.