Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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 Doneyes   Members   -  Reputation: 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;

}
}

Sponsor:

#2 6677   Members   -  Reputation: 1058

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 Doneyes   Members   -  Reputation: 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.



PARTNERS