x


JavaScript error BCE0005

script In this part of the script says....

mainCamera.transform.position = new Vector3 (transform.position.x, transform.position.y, mainCamera.transform.position.z);

It gave me the error

Unknow identifier:"mainCamera". (BCE0005) ¿how can I correct the error?

more ▼

asked Mar 23 '12 at 03:34 PM

e_m_l_i_a_n_o gravatar image

e_m_l_i_a_n_o
-4 5 6 9

Where is your mainCamera variable declared? Maybe you have a camera that is tagged MainCamera? If so then you refer to that as Camera.main.

Mar 23 '12 at 03:44 PM Graham Dunnett ♦♦
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3460
x3330
x108

asked: Mar 23 '12 at 03:34 PM

Seen: 528 times

Last Updated: Mar 23 '12 at 03:44 PM