- Home /
 
              This question was 
             closed Oct 05, 2012 at 05:57 AM by 
             Fattie for the following reason: 
             
 
            self fixed
Local Rotation and then Global Rotation
so i want to make a camera controller like the one from warcraft 3 the point is: i need to give it a look downwards first (to give an angle of view almost top-down) and then do a global y rotation (as the player rotates on the map) the problem is :
How can i Normalize an localRotation to a globalRotation
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by rokyed · Oct 04, 2012 at 12:27 AM
     #pragma strict
     var firstVector:Vector3;
     var finalVector:Vector3;
     var angleY = 0.0;
     var angleX = 0.0;
     function Start () {
     
     }
     
     function Update () {
     angleY+=Time.deltaTime*Input.GetAxis("Horizontal")*90;
     angleX+=Time.deltaTime*Input.GetAxis("Vertical")*90;
     transform.eulerAngles=Vector3(angleX,angleY,0.0);
     
     }
 
              Follow this Question
Related Questions
Rotating Player Controller locally or globally. 0 Answers
Local Look Rotation 0 Answers
How to open and close a door parented to a rotating object? 0 Answers
How can I rotate one axis locally, and another globally? 0 Answers
rotate 90% in local space 4 Answers