# Convert From C# Into JavaScript Please?

Hello,

I'm using the Unity 'MouseLook', but its in C#, and I only know (work with) JavaScript. If someone could be kind enough to convert this into javascript, then that would be great! (Its slightly modified)

``````using UnityEngine;
using System.Collections;

public class MouseLook : MonoBehaviour {

public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2 }
public RotationAxes axes = RotationAxes.MouseXAndY;
public float sensitivityX = 15F;
public float sensitivityY = 15F;

public float minimumX = -360F;
public float maximumX = 360F;

public float minimumY = -60F;
public float maximumY = 60F;

float rotationY = 0F;
public static bool headLock = false;

void Update ()
{
if (axes == RotationAxes.MouseXAndY && headLock == false)
{
float rotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX;

rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);

transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
}
else if (axes == RotationAxes.MouseX && headLock == false)
{
transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityX, 0);
}
else if (axes == RotationAxes.MouseY && headLock == false)
{
rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);

transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);

}

if(Input.GetButton("Jump") || SelectControl.toggleClick == true){
}
else{
}

}

void Start ()
{