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?
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?
To expand upon what Jack has provided, below is how angles work in Gdev;
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.