r/gamemaker•
DeathorGlory9

Since the gamemaker forums are down I'll ask here.

How would I make the camera move when the mouse hits the edge of the screen?

I have been using within an object:

x = mouse_x y = mouse_y

However its not as precise as I would like, as the camera starts moving around 20 -10 px before the mouse hits the edge of the screen. Can anyone provide an alternative to this where the camera only moves when the mouse is on the edge of the screen?

Posted Jul 10, 2012, 5:33 AM UTC

14
Loading comments…