Re: [Algorithms] Kinematic Collision
Brought to you by:
vexxed72
|
From: Jon W. <jw...@gm...> - 2009-09-07 17:21:43
|
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. |