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().
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.
Develop games in your browser. Powerful, performant & highly capable.
It's going to work, trust me.
http://dl.dropbox.com/u/7658043/mouseclamp.cap
It works like a charm.Here's an example cap.