[ODE] continuous forces w/ constant step size
Tyler Streeter
tylerstreeter at yahoo.com
Fri Sep 17 12:48:32 MST 2004
--- John Miles <jmiles at pop.net> wrote:
> > I don't see how that would do anything different
> from
> > the pseudocode I posted. In your pseudocode, the
> > input and continuous forces are still being
> applied
> > only once per visual frame, not once per time
> step.
> > Input will then be applied more often on a fast
> > machine than on a slow machine.
>
> I didn't see your corrected post, but you still have
> a problem, in that
> you're throwing away the fractional part of dT that
> remains when the final
> "while dT >= STEP_SIZE" test fails. This *will*
> cause ODE's notion of time
> to diverge from your app's. Fix that first and see
> if it magically feels
> better. I'll bet it will.
Actually I wasn't throwing away that fraction; I am
saving it until the next frame, then adding the new dt
to it like you suggest. Sorry I forgot to mention
that earlier.
> It's OK to apply input forces less often on a slow
> machine. They won't be
> as "valid," but your player doesn't have much choice
> since s/he is reacting
> to a slow and jerky portrayal of the game state.
> That's the problem with
> owning a slow machine. :)
>
That's a good point. Essentially, you still need a
decent machine to get good results. ...but I think
there are some things I can do to make the situation a
little better (namely, storing force events and
applying them every time step until they expire).
Tyler
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
More information about the ODE
mailing list