- Home /
Question by
termsofuse_bob · Feb 07, 2015 at 06:19 PM ·
raycastfpsspeedfirstpersonshooter
Can you change the speed of a raycast?
I am making a first person shooter, but I don't want the bullets to travel instantly. Is there any way to change the speed of a raycast?
Comment
Answer by Graham-Dunnett · Feb 07, 2015 at 06:21 PM
Compute how far the bullet has travelled from the gun in each frame, and use the distance
argument of the Physics.Raycast()
API.