[ODE] more specific questions on physical movement of players..

gl gl at ntlworld.com
Sun May 9 11:22:08 MST 2004


> 2) I have implemented a jump, which basically just calls this:
>    dBodyAddForce(bodyID, 0.0, 80.0, 0.0);
>   This works ok, but the problem is if the user holds down the jump key,
the
> force keeps getting applied, and the user quickly starts ascending. How
can
> I fix this?

Sounds like you're not caching the state of your keys.  Apply the jump force
once when the key first goes down, then wait for the key to be released
before doing it again.
--
gl



More information about the ODE mailing list