[SOLVED] Can't get object to move Right

I’m not able to get this object to move Right when the “d” key is pressed.

When testing the movement, I can get the object to go Left but when pressing the “d” to make it go Right, nothing happens.

Is there something I’m missing?


1 Like

To expand upon what Jack has provided, below is how angles work in Gdev;


I’ve copied that setup and it still isn’t moving right.

I think you don’t want to use > 770


Yup, that did the trick.

I found that if I wanted the paddle to stop without going off the screen, I set it to <665 (to account for the distance of the screen and width of the object).

Now it works perfectly.

You can also use ScreenWidth() - Paddle.Width() instead of the 665. It’ll work no matter how wide or narrow your viewport.

1 Like