Cleaned up Rigidbody tick function.