# Controlling foot step height

Hey,
For a while, I’ve been trying to get my armature animations to fit the height and slope of the floor which the character’s walking on, however, I can already align the foot’s axis to the floor normal but I also need control of step height.

I’ve tried some raycasts that place nodes for the foot to follow but it didn’t work well.

At first I thought about F-curves for controlling the step height, they worked pretty well in the editor by grabbing the blue (Z-axis) handle up, So is there anyway to control them via Python or drivers?

(Sorry for double post)

I just found this video randomly, it seems that it was uploaded just today:

Bump.
It’s been so long… anyone?

I use physics…

I use physics too but armature driven. So what I need is to get the armature to control step height.

Well, you could have the foot cast a ball that is invisible, in a arc, and when it hits a acceptable spot, send that as height?

I can already do that using ray casts. what I need is to make the foot actually go up when there’s a stair step or something infront of it/under it as in the video in post #2.

Ok, now using my method, you just use ForceMoveTo to apply forces to attempt to take a step.

With yours you will have to store points along the ray cast curve, and then move your armature target to match the curve?

cast rays - arc is clean for step
trigger----and—>start = True
if start = True (tap)----and-------add 1 to step
if step = 1 move target to curve point 1
if step = 5 move target to curve point 2
if step = 10 move target to curve point 3

and so on,

the more points interpolated the better the curve of the step,

if you armature target moves along that path, then the actor should follow,

here is a physics based “step caster”

the higher the arc, the higher the potential step,
having it on it’s own collision layer shared with the map, would mean you could mark some things as “kickthrough” by not marking them as map, and having them dynamic or Rigid etc.

### Attachments

StepTester.blend (495 KB)

another method,

it looks like he has a hitbox around the leg, and once a step is triggered the box colliding with map applies motion upward,

this will work, but have to have a limit as well, like for every frame add .2 to height, unless height is greater than X ?

Also, after the foot is “placed” on the step location, then you need another curve to move the Root object,