Sidescroller Script

I was asked to make a script which rotates your character based on where the mouse is.
It sounded pretty simple, so I did it, but then I thought, why not share it with others too.

It has a sample Sidescroller scene set up, which could work as a sidescroller, but is far from perfect.
Also if you change the axis on WatchMouse.js to y then you can make a topdown game, I´ll put up and example on it too.

373457–12925–$sidescroller_894.unitypackage (93.5 KB)
373457–12926–$topdown_128.unitypackage (94.5 KB)

I’m having a problem with this. I want to use the z camera direction but it wont work. It will only work if I have it set to x and then play the game and change it to z. Could you please help?