Answer the question
In order to leave comments, you need to log in
unity. How to find out the speed while an object is moving?
In general, there is an object, and on it is a RigidBody, and so, I need to get the velocity vector of this object at the right time. How to do it?
Answer the question
In order to leave comments, you need to log in
An object:
Rigidbody rb = GetComponent<Rigidbody>();
Vector3 v3Velocity = rb.velocity;
var speed = rigidbody.velocity.magnitude;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question