Comments and answers for "Calculate force needed to reach certain point (AddForce)"
http://answers.unity.com/questions/1362266/calculate-force-needed-to-reach-certain-point-addf-1.html
The latest comments and answers for the question "Calculate force needed to reach certain point (AddForce)"Comment by Serinx on Serinx's answer
http://answers.unity.com/comments/1511437/view.html
Hello, Sorry to Necro the thread. Does this factor in the mass of the object being launched? Or is it assumed the mass is 1?Mon, 28 May 2018 03:32:30 GMTSerinxAnswer by sysmaya
http://answers.unity.com/answers/1374090/view.html
This function calculate the Vector3 and speed for parabolic shoots.
EJ: Shoot Bows, Shoot canons, etc.
Vector3 calcBallisticVelocityVector(Vector3 source, Vector3 target, float angle){
Vector3 direction = target - source;
float h = direction.y;
direction.y = 0;
float distance = direction.magnitude;
float a = angle * Mathf.Deg2Rad;
direction.y = distance * Mathf.Tan(a);
distance += h/Mathf.Tan(a);
// calculate velocity
float velocity = Mathf.Sqrt(distance * Physics.gravity.magnitude / Mathf.Sin(2*a));
return velocity * direction.normalized;
}Tue, 04 Jul 2017 23:12:18 GMTsysmaya