Re: [Algorithms] Colliding with stairs and sliding up them....
Brought to you by:
vexxed72
From: R & D \(GameBrains\) <res...@ga...> - 2002-03-14 00:35:36
|
The ramp approach works well for the character in first-person view = because they can't see their feet, but what do you do for situations = like a two player game where I follow you up the stairs? Or chase an = enemy up the stairs? Cheers, Brett Bibby GameBrains ----- Original Message -----=20 From: "Neal Tringham" <nea...@nt...> To: <gda...@li...> Sent: Wednesday, March 13, 2002 8:19 PM Subject: RE: [Algorithms] Colliding with stairs and sliding up them.... > David Hunt writes: >=20 > >We cheat at stairs. We get our artists to mark the stairs as = non-collidable > >geometry and then replace the stair with a single invisible ramp - = more > work > >for the artists - but a lot more likely to be robust + the characters = don't > >bounce all over the place trying to scale them. We do employ the = levitation > >trick to get over small things like the edges of carpets I think - = Neal? >=20 > Yes, this is right. Stairs are treated as invisible ramps, but = there's also > a "hovercraft" system that detects whether a moving object is in = contact > with an underlying surface (where "underlying" is determined using the > current gravity vector) and floats the object above the surface within = a > predetermined height range. >=20 > This is done so that objects can ride smoothly over low pieces of = geometry > which may have vertical sides, such as carpets, but still collide = normally > with "real verticals" such as armchairs. >=20 > I've actually used a similar system to this to handle stairs in the = past - > we cast a ray forwards in the direction of motion, and then allowed = the > character to "jump up" if the ray was in intersection by an amount = hand > tuned to be slightly greater than the height of a single step - but I = was > never really happy with this approach. If you think about it, when = people > actually climb stairs, they're not sliding up the risers, but lifting = their > feet to reach the next step. >=20 > The ramp solution is, in my view, actually more physically realistic = than > jumping up stair by stair, since characters in games are usually = moving as > single rigid objects (which can slide up a ramp) rather than fully > articulated skeletons (which could climb stairs "properly"). >=20 > Neal Tringham (Sick Puppies / Empire Interactive) >=20 >=20 >=20 > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 |