Re: [Algorithms] Kinematic Collision
Brought to you by:
vexxed72
|
From: Jay S. <Ja...@va...> - 2009-09-03 17:26:46
|
> > I found that the most important thing to make this work is a very > robust > > sweep test(including hit normal etc). The sweep should also handle > > initial intersection (no matter what you do 8h1t Happens(tm)) giving a > > sensible depenetration vector and a distance to move to depenetrate > the > > objects. Pair wise seems good enough, although it would probably be > > possible to make this recursive as well. > > > > Since I added initial penetration handling my controller has not had > any > > problems, including moving lifts/platforms. > > I suppose it depends on your game. It's true that providing a > "depenetration > vector" can be useful, but I found it easier and more robust to just > make > sure it's never needed. In my small-game-at-home > (http://www.codercorner.com/blog/?p=355) I more-or-less use the same > code as > NxCharacter, and so far it has been robust enough. Granted, I don't have > big > needs or requirements out there, but I do have moving platforms :) Handling intersections in the initial state - or at least a separate query that determines whether a given starting position is valid - is fairly important for a lot of things you might do with the character. In our games characters transition between collision states, change models, transition from AI to player control, get teleported, get in and out of vehicles, transition from animation control to physical control, etc. Most of these are far easier to implement if you can test for a valid starting position. Jay |