- Home /
Camera transform not responding after load
Hi this is a weird one, my game is divided into two scenes, the menu and the game itself.
When the game is first loaded into the menu the camera pans perfectly from angle to angle as it is supposed to, however after playing a level and returning to the menu the camera no longer rotates.
I tried moving as well and that didn't work either so the whole transform for the camera seems not to be responding.
I've tried everything I can think of but I have no idea why this would happen, any ideas?
EDIT: The camera has a C# script that has in the Update() function the following line
transform.position = new Vector3(transform.position.x, transform.position.y+0.01f*Time.deltaTime, transform.position.z);
that works on startup but doesn't do anything after finishing a level and reloading the menu with Application.LoadLevel(0);
What are you using to make it move? is it a script or an animation? $$anonymous$$ae sure that both gameobjects in the scenes have the same options on the script / animation.
Have you maybe some static variables you're setting? Or PlayerPrefs?
Have you tried stripping your scene down to isolate the issue?
What function are you calling this code from Awake(), Start() etc?
Your answer
Follow this Question
Related Questions
Turning character with transform.Rotate 0 Answers
Moving Camera on player stop then move and rotate to separate point? 0 Answers
Quaternion Slerp Sanity Check 1 Answer
How to make the camera rotate only when right click is held down on the mouse? 1 Answer
Can the Camera Smoothly rotate AFTER a button is pressed? (Javascript) 1 Answer