For some reason my player sprite has inverted controls some how!

hey @richard something weird is happening in my game that I’ve secretly been working on… for some reason when the accalaration variable goes up the controls get inverted how do I fix also how can I make the accselaration not go up so fast?

please help :upside_down_face:

2 Likes

I think your doing something that’s making acceleration get below 0. Id recommend start by finding every function that has acceleration in it (entry function that either sets it to somthing, or changes it). There could also be a chance it’s undefined but that should be a different behavior.

1 Like

Here you go!

@1978monkeynutze
The problem was here:


Whenever you weren’t moving, the acceleration would go down by 5 constantly, every frame.
So it would eventually reach the negatives, resulting in inverted movement!


I simply added some checks to make sure that the bike doesn’t reach the negatives, or go to fast!

You’re welcome!

2 Likes

that still had a few issues (acceleration can still go before 0), this works though:

Also i fixed a glitch

1 Like

for some reason that’s stopping the movement umm idk why…

what do y’all think about the game? should I make a topic for it?

thanks

1 Like

Oh sorry, listen to @VoxelMaster64

I didn’t playtest my changes :sob:

2 Likes

its completely fine!

2 Likes