About Gdevelop physics movements

Hello, I am making a game in which a ball, when a key pressed should move right or left
I am currently doing it with the linear velocity X, but it’s not perfect and the speed increases infinitely
How can I fix it
And sorry for my bad English

You can try doing this:

Along with what you got

The problem you are experiencing is because while you press the left or right key, the x velocity will continue to decrease or increase.

If you only want it to increase or decrease once then you need to add a trigger once while true to both the key left and key right conditions.

If you want the velocity to increase up to a particular speed, then do as @Muzan has suggested.

1 Like

Ok i’ll try that and thanks for replies