Answers for "Raycast // Accuracy math pls help"
http://answers.unity.com/questions/1841480/raycast-accuracy-math-pls-help.html
The latest answers for the question "Raycast // Accuracy math pls help"Answer by unity_ek98vnTRplGj8Q
http://answers.unity.com/answers/1841484/view.html
All of your variables are integers, meaning they always have to be a whole number. Your accuracy should be a float, and your other values need to be cast as a float as you are doing math.
float accuracy;
int shotsFired, shotsHit;
accuracy = ((float)shotsHit / (float)shotsFired) * 100f;Wed, 09 Jun 2021 20:13:28 GMTunity_ek98vnTRplGj8Q