My question is fairly simple, most people here have played breakout. Is there a way I can use the mouse for the "paddle" but only allow it to move left or right, instead of all around the screen?
just set the x position to mousex. Clamp the range with clamp().
Develop games in your browser. Powerful, performant & highly capable.
Thankyou, nice to get an answer to a question finally. Im at work right now so can't try it out, but im eager to get back and plug it in. Let you know how it works for me.
It's going to work, trust me.
It works like a charm.Here's an example cap.