So I found [this][1] answer but it didn’t average the vectors. So I figured I could just add up all the vectors and divide by the muber of vectors. 10 in this case.
So my code looks like this.
public void OnMouseUp()
{
for (int i = 0; i < vectors.Length; i++)
{
average += vectors*;*
average *= .10f;
}
force = average;
//Makes sure there isn’t a ludicrous speed
if (rigidbody.velocity.magnitude > topSpeed || -rigidbody.velocity.magnitude < topSpeed)
force = rigidbody.velocity.normalized * topSpeed;
}
However it is not giving me the average. As you can see the numbers are too small.
![alt text][3]
[1]: Find the average of 10 Vectors - Unity Answers
[3]: http://i.imgur.com/Mljjz4h.png