How to get foot pivots from navigation meshes?

Started by
1 comment, last by JoeJ 6 years, 8 months ago

The navigation mesh I've built on the "staircase" geometry is an inclined ramp. When walking up, I need to find the foot pivot on the navigation mesh or the pure geometry. How do you guys know where the foot pivots are? Currently, I am just get the current foot position, add up an arbitrary value and the leg ik swings into action, and that's it....

I run out of ways to locate the foot pivot in the scene...

Thanks

Jack

Advertisement

For uneven terrain you could trace a ray from foot downwrads to predict contact point and normal and set end effector target from that.

For stairs this would lead to the behaviour of sometimes hitting a single step twice and sometimes skipping a step.

You could do multiple traces with small gaps along the path, analyze that data and plan your footsteps. (Pretty expensive but flexible, can also handle the case of player building a staircase from rigid body crates) You can also precompute one or multiple paths over a given staircaise and link this data to the navigation polygon to make it faster.

This topic is closed to new replies.

Advertisement