how to rotate a object using rigidbody in unity code example
Example: how to randomly rotate rigidbody of object in unity
public float speed; private Rigidbody2D rigidbody2d; void Start() { rigidbody2d = GetComponent<Rigidbody2D>(); rigidbody2d.angularVelocity = Random.value * speed; }