Re: [Algorithms] Kinematic Collision
Brought to you by:
vexxed72
|
From: Pierre T. <pie...@gm...> - 2009-09-05 00:46:32
|
> > I think a lot of people are overthinking character collision > detection and think you need volumetric representation > with sweep tests, etc. > I think a lot of people are overthinking a lot of things those days... :) When in actuality you can often get away with a few line > segment probes to detect collision with the world and use > a simple capsule test (or similar) to avoid character- > character interpenetration. > I remember a PPT describing the system used in GoW, yeah. It looked a lot like what we used some 10 years ago now, when I was working for a french compagny that should remain nameless. It was my first attempt at character collision detection with the world, and I used raycasts because I didn't know anything else. And indeed, it worked ok. Not perfect or anything but good enough for our needs. Now, 10 years later, writing code for a middleware... we can't decently sell simple raycasts to customers constantly asking for "next gen" solutions, can we? They never let you "get away with" anything :) That being said, and just to stay on-topic rather than going on a tangent to discuss the pros & cons of middleware, it might be worth it to provide two different CCTs to users: one "complex" version and one "light", simpler version. 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. And when all NPCs use the cheapest version, it doesn't matter anymore if the player uses a more costly but perhaps more robust test. (Whether it really -needs- it or not is another story, whose answer is probably game-specific), - Pierre |