how to give an object velocity unity c# code example Example: how to get rigidbody speed in unity var speed = rigidbody.velocity.magnitude;