Hey guys I’m working on a fps at the moment and I just watched a youtube tutorial where a guy was doing the mouselook part of the script (I copied that code, it showed green beside the numbers of the code lines yet it still came up with errors like, insert semicolon at end etc. Anyway I’ll post the code here and one of you here is bound to know what’s wrong.
public enum RotationAxis (MouseX = 0, MouseY = 1)
var RotationAxisRotationXY = RotationAxis.MouseX [ ] RotationAxis.MouseY
Where is the code? I just see only strange variables… Looks like you should find another tutorials, or just use standart mouse look from the First Person Controller prefab.
I think this will be more correct btw…
public enum RotationAxis {MouseX = 0, MouseY = 1}
var RotationAxisRotationXY = RotationAxis.MouseX || RotationAxis.MouseY;
var sensitivityX : float = 400;
function Update () {
}
Yeah I don’t think I copied the numbers here when I asked, but they are there in Unity. Also the guy in some tutorial said to import all packages except water when I was setting the project up. From these packages came scripts that already had code in them, should I play around with the code in them so it suits my game?.
[/code]||[/QUOTE]
Also I saw the guy in the tutorial put this funny symbol too, but the reason I didn’t type it in the code was because I couldn’t see it on my keyboard.