Re: [Algorithms] Kinematic Collision
Brought to you by:
vexxed72
|
From: Mark W. <Mwa...@to...> - 2009-09-08 00:39:17
|
The problem we've found with a single ray is unwelded geometry or cracks in geometry - the ray can fit between them and not register a hit, and the character falls for a frame or two (maybe longer if the player has a very small velocity). Using multiple rays (clustered for a single spatial query) solves this relatively easily. Then there's the situation where the ray(s) don't collide with anything but the body object (eg. capsule) does, like if you jump into a barrel where the rays don't touch the bottom but the capsule sits on the rim of the barrel. As long as you handle these cases it works pretty well - though it is pretty funny to jump into a barrel and get "wedged" like a fat dude (the first time anyway!) :-) Cheers, Mark > -----Original Message----- > From: Jon Watte [mailto:jw...@gm...] > Sent: Tuesday, 8 September 2009 3:21 AM > To: Game Development Algorithms > Subject: Re: [Algorithms] Kinematic Collision > > > The simplest character I find that I can get away with in the > general case is the lollipop. One ray for legs, and a capsule > for the body. The capsule extends between the knees and the > top of the head, and is slightly wider than shoulders (to > give some space for swinging arms, etc). This is fairly cheap > (capsule tests are cheap, and seldom actually collide with > things), and nicely prevents you from penetrating things > you're not supposed to. > > If you're really worried about sideways penetrations, or want > to cut a hundred more cycles from the collision test, you can > replace the capsule with a sphere. It won't let characters > get as close to things (or each other, if you test char/char), though. > > Sincerely, > > jw > > > David Black wrote: > > 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 > > > > -- > > Revenge is the most pointless and damaging of human desires. > > > -------------------------------------------------------------- > ---------------- > 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=gdalgo > rithms-list > > |