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

Mark Wayland mwayland at torus.com.au
Sun May 9 22:59:29 MST 2004


1) Sounds like your friction model or coefficient or whatever isn't good
enough... For your sphere, going down the stairs and not stopping probably
means the sphere is only in contact with the stairs briefly, and because
friction is only applied on contact, you aren't getting much of a movement
opposing force whilst bouncing down those stairs. I handle stairs explicitly
so that the player doesn't leap off the top of some stairs and land taking
damage - I hate that in games. If the player jumps, I turn off the 'suck
onto stairs' path through the code until the player has landed again.

2) For starters, you only want to jump when you're on the ground, right? So
that might be your first check. Secondly, as you probably can't ensure that
the force will be enough to move the player off the ground in exactly one
simulation cycle, you may need to 'debounce' the jump action such as only
applying it when jump is transitioning from not being pressed to being
pressed.

HTH,
Mark


----- Original Message ----- 
From: "Mike Reinstein" <web_fella at hotmail.com>
To: <ode at q12.org>
Sent: Sunday, May 09, 2004 2:37 PM
Subject: [ODE] more specific questions on physical movement of players..


> Hey all:
>
> I started implementing my the movement for players in the simulation.
> Following the advice hplus, I represent a character as a sphere, and apply
> forces to the sphere to make it move. It seems to work as I would expect,
> but now I need to take away some of the physical aspects to make it more
> realistic. Here are my questions:
>
> 1) when I release the movement and strafe keys, my moving entity keeps
> moving quite a bit. I think this is due to the fact that the sum of forces
> acting on the body are greater than 0, and because my friction is not high
> enough...I've also noticed that my sphere cannot come to rest on a set of
> stairs; it slides down the stars shortly after releasing the movement keys
> which im assuming is another result of the aforementioned issue involving
> friction and net forces...Am I correct? How do I go about fixing this?
>
> 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?
>
> I have other problems too, but these 2 are the most irksome...it seems
like
> my problems come from the fact that I'm applying continuous forces in
trying
> to achieve more discrete physical actions.
> Any help woyld be appreciated!
>
> thanks y'all!
>
> neko
>
> _________________________________________________________________
> Is your PC infected? Get a FREE online computer virus scan from McAfee®
> Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list