[ODE] First person shooter - falling over
danfrith at gmail.com
Sat Sep 17 15:55:26 MST 2005
I would like to simulate the player in a FPS. At the moment, I have a
sphere, but this of course rolls around which is undesirable! Now I
have tried simply setting the angular velocities of the sphere at each
step to zero, and this almost works however the sphere still rolls
very slowly. Also I think the ODE manual says something against
setting velocites directly.
However I have seen in this message
...a method is to attach an AMotor joint from the body to the static world (0).
I have tried creating the amotor then attaching to the sphere body. I
know there are angle/axis setting functions but I don't know how to
setup the joint to prevent rotations.
ode_joints = dJointGroupCreate(0);
dJointID joint = dJointCreateAMotor(ode_world, ode_joints);
dJointAttach(joint, ode_body, 0);
That's all I have so far... Any help would be much appreciated!
More information about the ODE