Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Mouse look script with java in Unity

4: Adsense

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   

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 6677   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 Doneyes   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.