I keep getting this error so I can’t test my code (it’s referring to the variable declaring part I think). But there is a semi colon at the end?
var backgroundList[];
var parallaxScales[];
var smoothing: float = 1;
var cam: Transform;
var previousCamPos: Vector3;
function Awake() {
cam = Camera.main.transform;
}
function Start () {
previousCamPos = cam.position;
parallaxScales = new float[backgroundList.length];
for (i = 0; i < backgroundList.Length; i++) {
parallaxScales <em>= backgroundList_.position.z*-1;_</em>
* }*
}
function Update () {
* for (i = 0; i < backgroundList.Length; i++) {*
_ var parallax = (previousCamPos.x - cam.position.x) * parallaxScales*;*_
_ var backgroundTargetPosX = backgrounds*.position.x + parallax;*_
var backgroundTargetPos = new Vector3 (backgroundTargetPosX, backgroundList_.position.y, backgroundList*.position.z);*
backgroundList.position = Vector3.Lerp (backgroundList.position, backgroundTargetPos, smoothing * Time.deltaTime);_
* }*
* previousCamPos = cam.position;*
}