- Home /
Question by
Mattivc · May 17, 2010 at 10:05 PM ·
javascriptphysicsraycastrandom
Add inaccuracy to a raycast
I am working on a script for a FPS, and im trying to add a slight random inaccuracy to a raycast. So it casts the raycast forward, but it diverges by a random amount of degrees from the absolute forward.
Anyone have a suggestion on how to best achieve this?
Comment
Best Answer
Answer by Mike 3 · May 17, 2010 at 10:26 PM
Check the top answer that was posted here:
http://answers.unity3d.com/questions/5602/fps-gun-accuracy-bullet-tracers
Your answer
![](https://koobas.hobune.stream/wayback/20220613003218im_/https://answers.unity.com/themes/thub/images/avi.jpg)