- Home /
 
               Question by 
               qasem-salehy · May 07, 2020 at 05:55 PM · 
                gameobjectvector3rotate  
              
 
              rotate to swip direction
hi
i have game object in scene . when i swipe up , right , left or down it start rotate to the direction here is my rotation code :
Rotate(Vector3.up, 90, 1.0f)
it rotate 90 degrees but when i rotate it to left or right , then up ; its not rotating correctly anymore !
because Vector3.up is not to upside of screen any more
i want to rotate to up no matter what is its local rotation values !
i attach a image for better understanding !
tnx

 
                 
                untitled.png 
                (74.9 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
unknown axis of rotation 1 Answer
Rotation is jumpy 2 Answers
Rotate a gameobject like car tire 2 Answers
Rotate GameObject Issue 1 Answer
what to put in vector3 when instantiating Gameobject at Gameobject? 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                