Posted: Sun Apr 13, 2008 1:36 pm
Hej Ville,
Input is indeed the desired velocity. The *1000 constant is used to convert DeltaTime to milliseconds ( therefore the Inertia has to be in the range of 30< to even be noticed, since it's set against the Delta in ms ), while the *-1 is to get the correct exponential curve.
When you'd want to use this formula for something like jph's vehicle rotation, you'd have a input of -1 ( or -0.25, whatever speed you want ) on Left, +1 on Right , and 0 on both or none. For the movement you'd do the same regarding input, but the actual use depends on if you want a Astroids approach, or have the Velocity tied to the current orientation. For the first ..
Concerning my ZGE endeavor, I actually started out with a 3rd person action game, but quickly found out that the platform is not ready to host such project yet ( Raycast / Character Animation ). So I switched to a First Person platform / puzzle type of game, although I nearly went with a vertical shooter altogether when having to find a work-around* for the Nth time
But I might go there once my first ZGE production is done 
*And my favorite work-around thus far has to be a old-skool password save system as writing to files is not supported as of yet.
Kind Regards,
Kjell
Input is indeed the desired velocity. The *1000 constant is used to convert DeltaTime to milliseconds ( therefore the Inertia has to be in the range of 30< to even be noticed, since it's set against the Delta in ms ), while the *-1 is to get the correct exponential curve.
When you'd want to use this formula for something like jph's vehicle rotation, you'd have a input of -1 ( or -0.25, whatever speed you want ) on Left, +1 on Right , and 0 on both or none. For the movement you'd do the same regarding input, but the actual use depends on if you want a Astroids approach, or have the Velocity tied to the current orientation. For the first ..
Code: Select all
Velocity.X += (sin(Rotation.Y*Pi*2)*Input-Velocity.X)*(1-exp(DeltaTime*-1000/Inertia));


*And my favorite work-around thus far has to be a old-skool password save system as writing to files is not supported as of yet.

Kind Regards,
Kjell