Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

How to get foot pivots from navigation meshes?

Recommended Posts

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

Edited by lucky6969b

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!