Comments and answers for "Vector3.Lerp moves in the wrong direction"
http://answers.unity.com/questions/995210/vector3lerp-moves-in-the-wrong-direction.html
The latest comments and answers for the question "Vector3.Lerp moves in the wrong direction"Answer by Wisteso
http://answers.unity.com/answers/995601/view.html
Lerp simply gives you a new Vector that is a mix of the two provided Vectors. The amount of influence each vector has is determined by your third parameter. Its important to know that Lerp provides the same exact result when given the same input. This means that moving objects at a constant speed is going to require extra work for your third (called T) parameter.
Lets assume *var A = Vector3.Lerp(new Vector3(0, 0, 0)* and *var B = new Vector3(-10, 10, 0), 0)*
- If you used Vector3.Lerp(A, B, 0.0) you would get a vector equal to A
- If you used Vector3.Lerp(A, B, 1.0) you would get a vector equal to B
- If you used Vector3.Lerp(A, B, 0.5) you would get (-5, 5, 0)
- If you used Vector3.Lerp(A, B, 0.25) you would get (-2.5, 2.5, 0)
Also, it seems like you're always going to call it with 0.25 as your T value. Unless you want the object to slow down as it gets closer to your target, you probably don't want that. Getting a constant speed of movement requires using an increasing/decreasing T value.Sun, 28 Jun 2015 00:51:56 GMTWisteso