[ODE] ODE in FPS

Dave Kerr aidave at telus.net
Mon Sep 29 16:50:10 MST 2003


Thanks for all the replies! :) Very helpful.

Right now I am experimenting with a player represented by a cylinder.  I
make the cylinder stand straight up and zero its angular velocity after each
step.  I have my own custom "physics" to define the player's direction.

  SetQuaternion(1, 1, 1000, 1000);  // sets it standing up in my world
  AngularVelocity(0, 0, 0);  // stops it from spinning

This works fairly well but some problems:

-The player wont always come to rest on top of another object.
-The player bounces alot.
-The player sometimes gets "bogged down" in objects, especially immovable
walls.

I am also trying to solve these problems:

-How can you tell if the player's feet are "on the ground"?  I am thinking
of adding a sphere at the bottom of the cylinder that gets a flag set upon
collision.  If that flag is true then the player is allowed to move/jump.
The player would be a composite of cylinder/sphere.

-Limiting the players velocity.  I have full control of the players
movement.  Forward, backwards, turning, jumping, strafing, etc.  The player
can get going very fast tho.  On the one hand, an explosion should send the
player rocketing off without regards to a speed limit.  On the other hand,
the player shouldnt be able to approach that speed simply by running.

The other major problem I am having is bullets.  I am sending out small,
high-velocity spheres.  These often go through other objects without a
collision.  I still have to try the ray class yet; what I would like to do
is have the ray only shoot out so far at each step, since my bullets aren't
instantaneous hit.

Dave




More information about the ODE mailing list