Hi, i need help with something slightly complicated. I've got my player, who moves with acceleration (very short acceleration). The player can press a certain key, and send out a vine. if the vine catches a pole, it will pull the player towards it with momentum. Everything is fine, except when i want to cancel the momentum, and i press left key to face the other direction, the player negates it (as intended), but than, the second i leave the key, his speed goes back to the momentum speed, (which looks weird). I already know the source of the problem, and it is in the line where i set the player horizontal speed (hsp):
hsp = ((key_right - key_left) * SPD_WALK) + round(vineMomentum);
This is because we are SETTING the hsp, and we aren't lowering the vineMomentum. I wonder if there is a way to fix this, i know i probably have to redo how the hsp works, im guessing i have to do += but stuck on how to make it work. Help would be much appreciated!!!