- Home /
Camera annoying error helps error
hello I'm doing mouselook camera movement and character but giving error tah boring symbol} but if I take it from another mistake this symbol have to look at getting the script 're saying is the last symbol error}
error:Assets/Scripts/MauseLooke.cs(51,1): error CS8025: Parsing error
using UnityEngine;
using System.Collections;
public class MauseLooke : MonoBehaviour {
private Transform Player, Cam;
public float velocidadeRotacao, velocidadeMovimento;
// Use this for initialization
void Start () {
velocidadeRotacao = 200.0F;
velocidadeMovimento = 10.0F;
Player = GetComponent<Transform>();
}
// Update is called once per frame
void Update () {
float orientacaoX = Input.GetAxis("Mouse X");
float orientacaoY = Input.GetAxis("Mouse Y");
if((orientacaoX != 0) || (orientacaoY != 0)) {
_mouseLook(orientacaoX, orientacaoY);
print(orientacaoX);
}
}
void _mouseLook(float orientacaoX, float orientacaoY) {
if(orientacaoX != 0) {
Player.eulerAngles += Vector3.up * Time.deltaTime * orientacaoX * velocidadeRotacao;
}
if(orientacaoY != 0)
Cam.eulerAngles -= Vector3.right * Time.deltaTime * orientacaoY * velocidadeRotacao;
}
}
}
Comment
Answer by PAEvenson · Sep 23, 2013 at 12:54 PM
Missing { bracket
if(orientacaoY != 0)
{ //HERE
Cam.eulerAngles -= Vector3.right * Time.deltaTime * orientacaoY * velocidadeRotacao;
}
thank you would never know that this error was there looking tava know basic computer program$$anonymous$$g