Quote:
Originally posted by jake13jake
so, are you saying don't try using vectors for this? I've completely forgotten vectors since the last time I used it. something about <x+,y+> or something.
|
No idea what that is. A vector is just a combination of numbers that usually represents position or direction&magnitude. In this case you're using a vector to represent the player's speed (though you're inexplicably calling it momentum). However, when you decelerate the character you are not merely reducing his overall speed by the value of this.friction - instead you are reducing his speed by a variable amount and changing his direction too.