Slowing a character down in EasyTok?

Blitz3D Forums/Blitz3D Userlibs/Slowing a character down in EasyTok?

D_Town_Tony(Posted 2008) [#1]
I have a main character (just a ball) when you press the left key I want him to roll in that direction at a speed (lets just say 5) and when you let go of the key I want him to come to a rather quick stop, or if I press the right key I want him to start rolling to the right.

I'm using this right now to go from Left to Right and vice versa, but how do I get him to speed up to that number quicker? and come to quick stop if I let go completely?

If KeyDown(Char_Right)
TOK_ApplyForce("Pivot",5,0,0)
EndIf

If KeyDown(Char_Left)
TOK_ApplyForce("Pivot",-5,0,0)
EndIf


Any help would be appreciated. Thanks!