Quote:
Originally posted by Kaimetsu
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.
|
lol, inexplicably? if you played with the script it might be explicable. I think I'm starting to understand what a vector is again, but I don't quite understand what it is in graal scripting.
I understand that I am changing the direction of the player. If I werent changing the direction he would be going through the wall (which it does sometimes anyways). I think I might have just thought of a solution, to the effect that I want. Maybe if I tested when the player was close to a wall and replaced momentum temporarily with the distance from the wall... wait... figures... how am i supposed to find the distance from the wall? I would try cutting momentum in half each time it doesn't detect but that most likely wouldn't give the desired effect... Why couldn't stefan have made this easier?