Re: [Algorithms] Kinematic Collision
Brought to you by:
vexxed72
|
From: David W. <da...@pl...> - 2009-09-06 16:02:39
|
Yeah, character controllers are tough. We use PhysX in HeroEngine (www.heroengine.com) and have been an early adopter of their original character controller... and made a lot... a lot... of code fixes to it (via John Ratcliff). But still, is yet to be as solid as I'd hope. And does not perform fast enough for all the NPCs to use it. Of course the engine let you do whatever you want. So you can just do simple "grounding" raycasts for NPCs and only use a character controller for your character or those close, or whatever fits your game best. But, in general, raycast colllision detection is pretty awful and leaky. I used that technique before PhysX and it had so many pathological cases that it was endless tweaking that would correct one thing and break another. Figuring out what surface is fine to "be on" and how to handle surfaces you should not be in, or the penetration into either is a major pain. In the simple cases its trivial, but in the face of arbitrary geometry from the artists, the slightest things can creep in to mess up algorithms that use to work fine. What amazes me is that this is one of those problems where the solution is more or less obvious to a human, but is difficult to express in realtime code. -- David Jeff Russell wrote: > > I saw a lot of people using the "complex" version for all > characters in the world, all the time, while there is often > another sub-system doing pretty much the same job for NPCs: > path-finding. The path-finder already computed a collision-free > path, so for those characters it's a lot easier to "get away with" > simple raycasts. > > > Agreed. > > Just finished a title where I had to make that exact call - the > character controllers were very expensive to run and we had large > character counts. Removing character controllers from most NPCs (and > using a few simple raycasts instead) solved the problem nicely, and > the pathfinding picked up the slack. > > Tried a distance based LOD scheme on these too. Proved unnecessary though. > > -- > Jeff Russell > Engineer, 8monkey Labs > www.8monkeylabs.com <http://www.8monkeylabs.com> > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |