Jump to content

  • Log In with Google      Sign In   
  • Create Account

Mouse look script with java in Unity


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1   Members   

104
Like
0Likes
Like

Posted 05 August 2012 - 08:52 AM

It says I have compiler errors. Anyone see something wrong? I have been checking this for about 10 minutes.


public enum RotationAxis (MouseX = 0, MouseY = 1)

var RotationAxisRotationXY = RotationAxis.MouseX || RotationAxis.MouseY;

var sensitivityX : float = 400f;
var minimumX : = -360f;
var maximumX : = 360f;
var RotationX : float = 0f;

var OriginalRotation : Quaternion;

var RotationY : float = 0f;
var minimumY : float = -360f;
var maximumY : float = 360f;
var sensitivityY : float = 400f;
function Update () {
if(RotationAxisRotationXY == RotationAxis.MouseX){

RotationX += Input.GetAxis("Mouse X") * sensitivityX * Time.deltaTime;

OriginalRotation = XQuaternion = Quaternion.AngleAxis (RotationX , Vector3.up);

transform.localRotation = OriginalRotation * xQuaternion;

}
}

#2   Members   

1054
Like
0Likes
Like

Posted 05 August 2012 - 09:43 AM

You know unity is javascript not java right, there is no relation between the 2. As for your problem, I don't know the fix or problem

#3   Members   

104
Like
0Likes
Like

Posted 05 August 2012 - 09:49 AM

Oh I thought javascript and java were basicly the same idea...




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.