Comments and answers for "Predicting the hit point on X axis, based on vector direction"
http://answers.unity.com/questions/1165571/predicting-the-hit-point-on-x-axis-based-on-vector.html
The latest comments and answers for the question "Predicting the hit point on X axis, based on vector direction"Comment by ramonfr on ramonfr's answer
http://answers.unity.com/comments/1165700/view.html
Yea thanks, that helps a lot.Tue, 05 Apr 2016 04:19:17 GMTramonfrAnswer by Happy-Zomby
http://answers.unity.com/answers/1165582/view.html
Hi,
If you look here
https://www.mathsisfun.com/algebra/trig-solving-asa-triangles.html
For your starting angle (the one at your kick origin) you can use this.
http://docs.unity3d.com/ScriptReference/Vector3.Angle.html
This will be angle b.
Then you have a 90° angle. If you go straight from your ball to the end of pitch line. So angle a is 90.
And you can also calculate that distance. The distance is the Base of your triangle between a and b.
With that you can get the left side of your triangle and get your prediction point by adding that to the x of your point on the pitch line we calculate earlier.
You can find sin and so on in the MATHF functions.
Hope that helps,Mon, 04 Apr 2016 22:21:00 GMTHappy-Zomby