how to access the velocity of an objecti in unity code example Example: how to get rigidbody speed in unity var speed = rigidbody.velocity.magnitude;