Is there a way to get velocity of a rigidbody in unity as a float code example Example: how to get rigidbody speed in unity var speed = rigidbody.velocity.magnitude;