I have a basic script to move my character, if another object hits a body change a boolean variable that will run moveandslide() for the player. When the player hits an Area2D it will stop and this code will keep repeating.
if GLOBALS.playerGoingToMove == true: #If i hit the box I move
elif GLOBALS.playerGoingToMove == false:
movecharacter() is inside of _physicsprocess(delta)
Initially it will run slowly, wait for a bit then it will go fast, wait for a bit and it will go faster.
I think I know what's going on but I can't fix it. I believe the Vector2(50,0) keeps on increasing but if I set it to Vector2(0,0) I thought that it would fix it but it doesn't.
I saw a video where he made the Vector2 a variable and reset the variable to equal the new current vector but I can't do that because it will stop moving once it hits something rather than using input controls.
Would really like input for my code if I did something wrong or forgotten about something.