7
$\begingroup$

I'm looking for a method to make a character walk properly to the angle of the floor.

So when he walks up a hill the feet have to be always touching the floor correctly and the walking motion of the legs has to change with the angle too.

Walking the hill straight up or down is one thing, but imagining the character running sideways on it so that one leg is at a higher level than the other is more difficult.

Plus it will have a joystick-like rotation whilst walking so it blends from the "sidehill" animation to the uphill or downhill animation.

Does anyone have experience with this issue? Any tutorials, hints, tips, guesses, ressources, etc. would be much appreciated.

Any guesses on how to script this? E.g. how to change the model/animation according to the angle of the floor?

$\endgroup$
4
  • 2
    $\begingroup$ Although this can be done in standard animation fairly easily, using the BGE might make it a bit harder. $\endgroup$
    – J Sargent
    Commented Feb 8, 2015 at 19:49
  • $\begingroup$ Wow that was fast! Yes a simple animation is not the deal, the idea is about a script to make the walking animation change so it (and the whole character's pose) matches the floor angle. You would need to detect the floor angle, and then change the foot joint angle and the leg movement so the feet would touch the ground and the character would pose to it realistically. Or something like that. $\endgroup$
    – Jonathan
    Commented Feb 8, 2015 at 19:54
  • $\begingroup$ I'd try looking at the physics tools there is also some stuff online about making a rig without code altogether that does this, I don't remember where though :( . $\endgroup$ Commented Feb 8, 2015 at 20:00
  • 3
    $\begingroup$ here's an excellent video on this topic. In case the link changes, it's called An Indie Approach To Procedural Animation by David Rosen:Wolfire Games gdcvault.com/play/1020583/Animation-Bootcamp-An-Indie-Approach $\endgroup$ Commented Feb 8, 2015 at 23:06

1 Answer 1

4
$\begingroup$

Ok,

you can change the angle of the step, easy enough with a ray, and parenting the animation handles to a empty that animate the feet, just use track to another empty on the empty the feet animation handles are parented to, and place the empty via a ray. (so the player will walk up and down hills and change stride angle)

The hardest way (and best way) is this

http://www.youtube.com/watch?v=ZtzQAluEgts

This is a walking ragdoll, that uses the step offset angle code, along with the fact that it really walks.....

http://blenderartists.org/forum/showthread.php?353549-Non-PID-Ragdoll-based-on-Jackii-s-work-made-for-quot-Wrectified-quot

here is the 'base' of that rig.

$\endgroup$
2
  • 1
    $\begingroup$ Would you like a tutorial? $\endgroup$ Commented Mar 15, 2015 at 22:50
  • $\begingroup$ Thank you for the offer mate but I'm currently busy with another thing in Blender. Could I write you a message when I come back to this? I'd highly appreciate some animation related coding instructions. $\endgroup$
    – Jonathan
    Commented Mar 19, 2015 at 15:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .