Re: [Algorithms] more character motion trouble
Brought to you by:
vexxed72
From: Thatcher U. <tu...@tu...> - 2003-01-13 00:44:01
|
On Jan 11, 2003 at 06:56 -0800, Charles Bloom wrote: > > At 04:42 PM 1/11/2003 -0000, Tom Forsyth wrote: > >Maybe cast a cylinder vertically to sample the surfaces, rather > >than use a sphere? That way you have sensible areas to weight your > >decisions by. Actually, it probably doesn't matter what sort of > >volume you use - a square might make calculating areas a bit > >easier. And since you're only using this to produce weightings, the > >shape shouldn't affect things much. I think the important thing is > >to "cast" the shape vertically in some way, rather that think of a > >single or few points of contact, which is what you get with a > >sphere/ellipsoid. > > I think the idea of casting a square down (it's a frustum) is a > really good one. You should already have frustum-world polygon > clipping code for use with decals, and that should be fast. Then > you get all the polygons "under" the player and you can look at all > of them and make some averaged surface by considering the areas of > the fragments after clipping into the frustum. > > One problem is that, again since I have triangle soup, the stuff > you're walking on is not simply connected. So, when you cast your > frustum you may also get lots of extra polygons that are actually > under-ground, or redundant, etc. You can't tell which polygons are > the right ones to use without doing CSG, which is forbidden (input > geometry is not compliant). I dunno, it sounds kind of expensive if it applies to more than just the player character. It seems to me it's much cheaper and still pretty attractive to get the continuity by smoothing in time, since all these calcs have to be repeated every frame anyway. I guess the tradeoff with that is you end up with a character that feels somewhat massy, instead of the typical super-tight no-inertia console character. -- Thatcher Ulrich http://tulrich.com |