Answers for "unity always rotating object"

C#
2

object spin unity

void FixedUpdate()
{
	gameObject.transform.Rotate(0, 0, +1)//Rotate(x, y, z) + = add one per update
}
Posted by: Guest on October-04-2020
0

unity always rotating object

public float speed = 50.0f;


    void Update()
    {
        transform.Rotate(Vector3.up * speed * Time.deltaTime);
    }
Posted by: Guest on February-02-2021
0

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.
    }
Posted by: Guest on August-06-2020

C# Answers by Framework

Browse Popular Code Answers by Language