Jump to content
  • Advertisement
Sign in to follow this  
QuadMV

Aligning feet to ground/terrain?

This topic is 4764 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. I have a problem and I’m looking for suggestions/ideas on how others might deal with this. I know the height of the terrain under an object I’m trying to render, (ie: a player object). However, due to curves in the terrain, sometimes the foot either goes through the ground, or is hanging off in mid air. I can’t really rotate the player, as that wouldn’t look right. In real life our legs bend and twist to the terrain, but I’m thinking that’s going to over complicate things if I tried to do that to my object. I was thinking of a way to disable the z buffer or something, but then I’d always be in front of everything, and that won’t work either. Does anyone have any suggestions, tips or tricks on how to get the feet better aligned with the ground, and not have them rendering through the ground? Thanks

Share this post


Link to post
Share on other sites
Advertisement
What you need is an inverse kinematics.

Or just do some simple movements for the front bone in the foot to match the angle of the terrain.

Share this post


Link to post
Share on other sites
Ok, first, to get it out of the way: Dont worry about it, in general the issue you descrive is hardly noticiable, I dont know what your exact situation is, but unless you're writting a game in which the player view is thru a camera pointed at the characters feet, no one will complain.
Usually if your character's pivot point is right at its feet, and you use this point to set the height at which the character is at, you get acceptable results.

Now, if you still want to make it pixel perfect, I guess you could use a bone animation 3D format, and tag the joints at the ankles, then rotate them acording to the slope of the triangle each foot is at to match it, again, this is probably too much work for something only someone looking for it will notice though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!