Comments and answers for "Linear Velocity"
http://answers.unity.com/questions/177015/linear-velocity.html
The latest comments and answers for the question "Linear Velocity"Answer by Mike McFarland
http://answers.unity.com/answers/177075/view.html
The rigidbody has the velocity of a given game object. If you want the projection of one vector onto another then what you are looking for is the dot product
so for c#)...
<code>
float speedForward = Vector3.Dot(rigidbody.velocity,transform.forward);
</code>
which assumes this is a behaviour on a gameobject with a rigidbody...
these pages may be helpful:
http://www.mvps.org/directx/articles/math/dot/index.htm
http://unity3d.com/support/documentation/ScriptReference/Rigidbody-velocity.htmlSun, 16 Oct 2011 03:37:25 GMTMike McFarland