What are the units of the velocity property of the rigid body? Is it units/second? units/minute?
5 Answers
5Strictly speaking the unit of the velocity is units/s. But since most user lets the default base unit to be one meter, then the velocity is in m/s.
You could change that by modifying accordingly the value of the gravity. Or if you don’t use gravity, then the base unit is what you want it to be.
In some case, for example for space games, you could change that. As long as you agree to a particular value for the base unit within your team, everything will be fine.
So if I set my 2D velocity to (1,0) that should translate to 100 pixels (if unity units are set to 100 pixels per unit) per second? My animation seems to run much slower than that.
– KokodokoGamesThe result unit would be m/s and not m/s².
effectively, the m/s² unit is the one applied to the gravity, being an acceleration.
but the velocity is a speed, so distance per time.
Rather than echoing unproven claims or blindly trusting the Unity docs (which have been incorrect from time to time, unfortunately), I decided to put an end to the debate and conduct an actual controlled test and measure the results for myself. Test was performed in Unity 2018.3 with fixed timestep set to 0.01 seconds.
Here is the video of the results:
![]()
In it, a velocity with a magnitude of 1 appears to be approximately equivalent to 1 Unity “unit” per second. As such, the docs appear correct. (Note that the .gif doesn’t playback at the original speed. See here for a better video.)
What’s more interesting is that this is an absolute velocity as mass had no significant effect on the time it took the cubes to move the 1 unit. This is as expected, but somewhat strange to me given my comment from around a year ago in which I (incorrectly) reaffirmed that the velocity was specified in units/frame. I do not remember what led me to that conclusion… perhaps there were external forces in that particular case skewing my results. Regardless, it is incorrect and should be disregarded.
I believe THE ACCELERATION is in meters/second^2 (meters-per-second squared). If you look in the physics-manager, under gravity, the value is set to -9.81, which is equal to Earth’s average force of gravity, at 9.81m/s^2. Additionally, Unity’s units of distance are measured in meters, so it would only make sense that the ACCELERATION would follow that.
VELOCITY (ie, speed) is in meters/second (meters-per-second).
No, no, no…
Amazing how many wrong answers are around the internet and no one bats an eye!
Velocity is given in Units / Frame (not second).
That’s why the values appear to be so low most of the time when you use Debug.Log(transform.velocity)
Velocity is simply the DIFFERENCE between the Current and Last POSITIONS of a transform.
Which means is calculated using the Current and Last FRAMES, not the current and last seconds.
If you want to get the velocity in Units/Seconds you have to divide the Velocity Unity gives you by the DeltaTime. ex: Vector3 velocityInSeconds = transform.velocity / Time.DeltaTime;.
I actually just recently ran into this. I assumed it would be in units/second without giving it a second thought and was puzzling as to why everything seemed so slow. Divided by deltaTime and things look as expected. In hindsight, this should have been obvious, but hey, hindsight is 20/20. Giving this a +1 for helping resolve the other misinformation on this page. As a side note, the above comment regarding transform.velocity is incorrect and should instead be Vector3 velocityInSeconds = rigidbody.velocity / Time.deltaTime;.
Unity docs define Rigidbody.Velocity as units/second. > A velocity in Unity is units per second. The units are often thought of as metres but could be millimetres or light years. Unity velocity also has the speed in X, Y, and Z defining the direction. [Link to docs][1] [1]: https://docs.unity3d.com/ScriptReference/Rigidbody-velocity.html
– SkegonTo whom ever found this comment and got confused by it, this comment is completely WRONG and Rigidbody.velocity has a unit of meters per second. This previous statement is based on the official Unity documentation at https://docs.unity3d.com/ScriptReference/Rigidbody-velocity.html
– MMX3VIII
Essentially, everything in Unity (and all game engines) is real-life. It's meters, kilograms, and seconds.
– FattieYes, it's meters per second. Velocity (in this universe) is measured in meters per second. Acceleration is measured in "meters per second per second" which is to say "meters per second-squared" or "ms^-2" or "m/s^2"
– Fattie