magic-maze
magic-maze copied to clipboard
Allow the camera to be moved with the mouse
https://github.com/ashugeo/magic-maze/blob/96f1fabb99995ca773cf336eae3e5acdedf03c7a/src/client/play/js/config.js#L7
I see there is a cameraMouse
configuration value but setting it to true
doesn't seem to do anything (besides adding errors to the browser's console).
Some ideas for moving the camera with the move:
- primary click and hold then move the mouse to pan
- secondary click and hold then move the mouse to pan
- press down on a key (such as shift or whatever) and then move the mouse to pan
Yeah, cameraMouse
must be deprecated. The way I implemented it at the time was to have the screen pan to whatever direction when your mouse was approaching a border (as in many games with maps).