make a cylender rotate continously unity code example
Example 1: object spin unity
void FixedUpdate()
{
gameObject.transform.Rotate(0, 0, +1)//Rotate(x, y, z) + = add one per update
}
Example 2: unity rotate towards
Quaternion.RotateTowards(Quaternion from, Quaternion to, float maxDegreesDelta);
Example 3: c# how to make object rotate forever
//Use FixedUpdate instead of Update for physics, rotation, and movement.
void FixedUpdate()
{
laserPointer.Rotate(x, y, z);
//Use your own rotation values to replace x, y and z.
}