- Home /
 
               Question by 
               CookieKirby · Nov 29, 2013 at 07:11 AM · 
                lerpsmoothrotatearoundslerprotate rotation  
              
 
              How can i smoothly rotate a gameobject
How can i rotate rigidbody smoothly at a constant speed on the xz plane?
               Comment
              
 
               
               var speed = 90.0;
 
 function Update() {
     transform.Rotate(0.0, Time.deltaTime * speed, 0.0);
 }
Answer by qwertyk31 · Nov 29, 2013 at 07:25 AM
 function FixedUpdate ()
 {
       transform.eulerAngles = Vector3(0, 0, 0);
 }
Change the zeros to set the speed of rotation, the FixedUpdate makes sure you get a constant speed
Your answer
 
 
             Follow this Question
Related Questions
Slerp / lerp not creating a smooth transition 2 Answers
Problem with Lerp/Slerp 1 Answer
Slerp / Lerp RotateAround() 0 Answers
Rotation with RotateAround 2 Answers
How you change another script value smoothly on trigger 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                