Roland Posted June 15, 2012 Share Posted June 15, 2012 Well.. actually my feet's are on the ground, but my game character has that problem. Walking on flat terrain is no big problem, but when she enters hills and rough terrain her feet's floats above the ground. I guess that is cause by some collision mesh thing and is hard to avoid. Above she is standing on a slope. (left image with Debug Physics on). I guess make the diameter of the collision cylinder would make the problem less prominent, but is that the only way to go without writing your own controller. How do you guys solve this or at least minimize the problem? Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Road Kill Kenny Posted June 16, 2012 Share Posted June 16, 2012 I don't know the how everyone else would do it in the industry, however this is how I would do it: 1. Shoot a ray-cast from both the left and right foot bones directly vertical 2. If if either ray hits something at a distance greater than X (you decide was x is.... close to 0 I'd say), - adjust the model offset from the model to the controller by moving the model down by the amount of the longest raycast. - Move the foot bone with the shortest raycase distance up by whatever that distance was. Ensure that if the raycast length difference between the left and right are no greater than Y otherwise it will look silly.... In this case the character should probably fall down the hill or slide down it or somthing. This should give the effect of your character adjusting their footing while on hills. I've seen this done a lot in 3rd persons and this is just my way of understanding it. To edit animations manually in run time by moving bones check out this short little tutorial of mine that I did a while ago: - http://www.leadwerks.com/werkspace/page/articles/_/programming/character-animation-tricks-tutorial-r83 Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
tjheldna Posted June 16, 2012 Share Posted June 16, 2012 I know the C4 Engine solves this a bit better by using a capsule instead of a cylinder. I doubt that would help anyone here though =). Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 16, 2012 Share Posted June 16, 2012 Your cylinder is way too wide for the character. Make the cylinder as narraow as the characters body. To prevent that arms go trough walls, animate them to raise arms when close to a wall, that's how crysis does it also when the weapon is too close to the wall. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Roland Posted June 16, 2012 Author Share Posted June 16, 2012 Wow. Thanks all for the input. I will test with all your advices Josh! Wouldn't it be just like piece of nothing to replace the cylinder with a capsule... wishful thinking ... Ken. Great video. Thanks Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Pixel Perfect Posted June 16, 2012 Share Posted June 16, 2012 Yeah, this is where we really need 'Foot Placement' and IK. It gets quite complicated to get it looking even semi realistic for most situations! Chris Paulson did some nice work on this. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Naughty Alien Posted June 16, 2012 Share Posted June 16, 2012 Roland, capsule will not make any serious difference. With capsule, you may eventually end up that some parts of your character (feet) cutting inside terrain, so its not a solution..best way is along lines Scarlet Thread Studios suggested, but if that is too much, just simply make radius of controller to wrap character mesh very tight..its common thing and you may see that a lot of games have slight 'floating' characters. Typical example is Tomb Raider..unless some serious accuracy is a factor, either capsule or cylinder will do well, and instead, it has to be some custom made system.. Quote Link to comment Share on other sites More sharing options...
Roland Posted June 16, 2012 Author Share Posted June 16, 2012 Roland, capsule will not make any serious difference. With capsule, you may eventually end up that some parts of your character (feet) cutting inside terrain, so its not a solution..best way is along lines Scarlet Thread Studios suggested, but if that is too much, just simply make radius of controller to wrap character mesh very tight..its common thing and you may see that a lot of games have slight 'floating' characters. Typical example is Tomb Raider..unless some serious accuracy is a factor, either capsule or cylinder will do well, and instead, it has to be some custom made system.. Naugthy. I trust in your experience. Think I will try to reduce the cylinder diameter a bit and go with that. Later on I will have to dive into code manipulated movement of limbs anyway (some simple IK for moving the hand to pick up things), so I will test Scarlets suggestion at that point. Thank's guys You are great. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.