I have recently posted a question about moving a camera and player on collision.
But when I attempted to rotate the camera the script didnt work.
I entered this code
Main.Camera.Transform.Rotate = new vector3 (34,36,39)
It gives me an error along the lines of vector3 cant be used.
Can anybody give me any idea as of what to do?.
Also is it possible to change the fog density. Via the same script?.
There is no such thing as Main.Camera but you can use Camera.main
To access the transform component of an object, use .transform (note it is lowercase)
To rotate a transform use the function Rotate. Note that you use it by passing parameters to the Rotate function, not by assigning a value.
Remember the semicolon at the end.
So the final code would be:
Camera.main.transform.Rotate(34,36,39);
Whenever you are in doubt about scripting syntax, consulting scripting reference is a good idea. I would also suggest going through a couple of our tutorials before diving right into scripting with Unity, especially if you are new to programming in general.