[ODE] converting velocity to the equivalent force value?

Jon Watte hplus-ode at mindcontrol.org
Sat Aug 21 11:04:40 MST 2004


Let's ask Mr Basic Physics and see what he has to 
say (using vector math):


  new_velocity = old_velocity + acceleration * time


"time" is your time step size.
Solve for "acceleration":


  (new_velocity - old_velocity) / time = acceleration


Now, we know that:


  acceleration = force / mass


So:


  force = (new_velocity - old_velocity) * mass / time


QED.


Cheers,

			/ h+



-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Megan
Fox
Sent: Saturday, August 21, 2004 9:01 AM
To: Ode
Subject: [ODE] converting velocity to the equivalent force value?


What is the proper calculation to determine the amount of force that must be
applied to make an object accelerate near-instantly to a particular velocity
(or decelerate to zero from a particular velocity)?


This is for player movement - to get "tight"-feeling motion, I'm finding
it's necessary to simply negate the velocity after it reaches a certain
cut-off point, but to do that I need to know how much force must be applied
to counter the current velocity (I'd been told that setting velocity
manually in cases like this would cause instability?).

As it stands, I have it working, but through a (not even remotely
scientific) velocity to force conversion multiplier.  At 100, I can get
perfectly tight control, but I get a certain amount of single-frame
jittering of the player mesh depending on how the player is moving
(primarily when cornering), which I think is rubber-banding due to me
applying too large a counter-force.

-Megan Fox / "Shalinor"
Lead Developer, Elium Project (http://www.elium.tk)

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list