Re: [Algorithms] 3rd person adventures - The saga continues!
Brought to you by:
vexxed72
From: Mick W. <de...@mi...> - 2005-11-02 17:44:35
|
Diogo de Andrade wrote: >Hey all! > >Thanks for the incredibly helpful hints and explanations. >One question, for the first posters: you consider the ground a separate >object with some flag indicating his state as "ground"? I'm a bit afraid >of the XZ collision response if I include the ground in the mix (since >my ground is something of a landscape, so rolling hills, etc) > > > It's probably a good idea to flag certain objects or polygons as being "ground', but it depends a lot on the nature of the world you are building. You could instead just classify polygons as "ground" based on their face normals (if polygon.normal.y > 0.5 then ground, or something). The "on ground" and "in air" locomotion should be handled using two entirely different sets of physics and logic. On-ground movement is movement parallel to the ground (not horizontal movement). In-air is simply movement under gravity. Unless your game is very simple, don't think of an XZ collision response. Think of it as the collision response in the 3d direction of motion. You probably don't want to use the bounding volume. Mick. |