- Home /
How do I turn the Main Camera 90 Degrees on the X axis
How do I turn the Main Camera 90 Degrees on the X axis without it focusing or orbiting around a gameobject? Because on my Main menu screen when the player hits the button "Sandbox" I want the camera to turn 90 degrees on the x axis so its looking at another set of 3D Text which shows the different Maps to play on. But I know what to do when the player clicks one of the maps.
Answer by Jessespike · Oct 31, 2012 at 10:01 PM
Camera.mainCamera.transform.Rotate(new Vector3(90, 0, 0));
Answer by markpdolby · Nov 01, 2012 at 11:08 AM
Camera.mainCamera.transform.eulerAngles = Vector3.Lerp(Camera.mainCamera.transform.eulerAngles, new Vector3(90, 0, 0), Time.deltaTime*speed);
where speed is a variable in your code to control how fast it rotates to that point.
C# Please i find it better and easier. Could I also have a fade in fade out effect
Thanks
It is in C# and could you explain what you mean by a fade in and out effect?
lerp will provide a "fade" tansition based on the speed varible
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to make camera stop moving in pause menu? 1 Answer
Switching between one or more cameras in the same scene? 2 Answers
Constrain axis of isometric camera ("vertical" only) 0 Answers
Input.GetAxisRaw 1 Answer