Re: [Algorithms] 3rd person adventures - The saga continues!
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2005-10-31 16:33:32
|
> a) Use the collision detection + response to handle the walking; put > simply, see if the character's bounding box intersects the world and if > it does, get the normal of that collision and do the sliding thing What a lot of games have been doing (including us) is to treat the character as a bounding primitive of some sort; typically a sphere (for BSP FPS-type games) or capsule (typical for 3rd-person games). Often, the capsule is made to hover at knee level, with a raycast going down for ground contact, plus some rays + IK to fix up the feet in the walk cycle. The ray can go from the center of the capsule; just make sure the test does not consider the capsule itself as an intersector :-) The benefit of this representation is that you get to control the "girth" of the avatar (the diameter of the capsule), and you can guarantee that you will always fit a certain height (the height of the capsule), which you can target your "crouch" states toward. There are more pieces to the puzzle of making a good third-person character controller, but those pieces should give you a good start, and lead you in the right direction. Cheers, / h+ -- -- The early bird gets the worm, but the second mouse gets the cheese. |