[ODE] FPS Player physics: how to construct player, how to move up a staircase, etc?
shalinor at gmail.com
Sat Jul 22 10:15:05 MST 2006
The one that's somewhat overlooked (and I kind of wish I'd gone with)
is to break your world into two classes of collision. Those things
that you collide with the "movement shapes," those things you collide
with the "rigid shapes," and the things you collide with both.
If you separate these concepts early and keep to it, the problems of a
non-floating capsule vanish. Stairs are modelled as ramps (with the
separate stair shape for ragdolls and other stuff), obstructions on
the floor are modelled as smooth bumps rather than ledges, and the
problems of an ass-dragging capsule vanish. Furthermore, this saves
you the (very lengthy and irritating) process of balancing the float
ray, which effectively needs to be a 1-way critically dampened spring.
I have a floating capsule imp, and I like it, but were I to do it
again I'd probably go with the dual collision definition. The crap
I've gone through for the tiny, tiny gains given by the float ray just
isn't isn't worth it. Furthermore, a solid dragging cylinder just
looks better, as you don't get the problem of the game not recognizing
your feet as solid entities and can actually have things not slide
right under your character mysteriously.
On 7/22/06, Jon Watte (ODE) <hplus-ode at mindcontrol.org> wrote:
> This is covered in the Wiki and FAQ. The most popular option seems to be
> a ccylinder (capsule) for body on top of a raycast for legs/foothold.
> / h+
> michael kapelko wrote:
> > So at last i got some basic ODE knowledge.
> > I loaded an Q3 level, made TriMesh geom of it, so now it's like "ground".
> > Now I need to make FPS Player. How to make it?
> > I thought I can create it of two spheres connected with a slider joint
> > so the player is able to sneak.
> > And I want to place camera into the upper one.
> > But then there exists a hole in the "middle" of the player, so it will
> > result in strange collision.
> > So what is the best way do it?
> > And how to move up a staircase? I'm at a loss how to do it. Should I
> > measure the height of a stair and then, if it's not high enough, move up
> > to the next stair?
> > Thanks.
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
> ODE mailing list
> ODE at q12.org
More information about the ODE