- Home /
why update function doesn't work on the transform.Rotate function
hi,
i have been trying to rotate an object around it self without stopping ,but it gets to a certain degree and than it stops
using UnityEngine;
using System.Collections;
public class Digivolution_stats : MonoBehaviour {
void Start()
{
}
void Update()
{
transform.Rotate(0,1 * rotation_speed * Time.deltaTime,0);
}
}
What you have will continuously rotate (assu$$anonymous$$g rotation speed is defined and not 0, which seems to be true, since you says it spins then stops.)
Something else is wrong. Does it also have a rigidbody? Those rotate on their own (if the object should fall.) Is any other script changing the object? $$anonymous$$eep checking Inspector values while it runs -- maybe sit is spinning.
Your answer
Follow this Question
Related Questions
An object reference is required for the non-static field, method, or property 1 Answer
Camera controller makes camera involuntary rotate around local z-axis 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to make object turn around and go back to original place? 1 Answer