Moving the camera on mouse button up


I'm creating a 3d menu system, I've placed all the items and added the box colliders.

What I would like to do it, rotate and move the camera on 'OnMouseUp'

I have no idea how to do this being a noob. It would also be nice if I could set the speed of the movement too.

Can anyone help?

Thanks in advance!

From what you say it may seem like you're looking for `OnMouseUp` function. It is well described in the manual.

But maybe you mean moving the camera by holding down the mouse button anywhere on the screen. Then you can add the Standar Asset to your project and use the `MouseLook`, or grab one of the modified versions of it on the UnifyCommunity Scripts.

This is untested...

var turnSpeed = 10.0;

function Update ()
    transform.EulerAngles.y += turnSpeed * Time.deltaTime;

Put this script on your camera.

Ask if you get any errors and I will see what i can do ;)