- Home /
Question by
ViniciusMestre1 · Jun 18, 2015 at 06:15 PM ·
errorparsing
CS8025 ERROR : Camera Script
Hey, I was making a camera movement but Im getting CS8025 ERROR:Parsing Error and I don't know how to fix it.Please someone help me!!(PS. IM NEW IN THIS FORUM)
My code
using UnityEngine;
using System.Collections;
public class Controle_Camera : MonoBehaviour {
public GameObject player;
public float speed = 5.0f;
private Vector3 offset;
void Start ()
{
offset = transform.position - player.transform.position;
}
void LateUpdate ()
{
transform.position = player.transform.position + offset;
}
void Update ()
{
if(Input.GetKey(KeyCode.RightArrow))
{
transform.position = new Vector3(speed * Time.deltaTime,0,0);
}
if(Input.GetKey(KeyCode.LeftArrow))
{
transform.position = new Vector3(speed * Time.deltaTime,0,0);
}
if(Input.GetKey(KeyCode.DownArrow))
{
transform.position = new Vector3(0,speed * Time.deltaTime,0);
}
if(Input.GetKey(KeyCode.UpArrow))
{
transform.position = new Vector3(0,speed * Time.deltaTime,0);
}
}
Comment
Answer by DoTA_KAMIKADzE · Jun 18, 2015 at 06:16 PM
Add 1 closing bracket "}" at the end of your script.
Like this
}
if(Input.Get$$anonymous$$ey($$anonymous$$eyCode.UpArrow))
{
transform.position = new Vector3(0,speed * Time.deltaTime,0);
}
}
}