- Home /
 
 
               Question by 
               GuyFawkes · Oct 27, 2011 at 01:31 AM · 
                javascriptraycastprojectile  
              
 
              Firing a projectile along with raycast?
Right now for my gun I'm using raycast. But I'd like to know, how would I fire a projectile (such as a bullet) with raycast?
               Comment
              
 
               
              Answer by SirMacJefferson · Oct 27, 2011 at 03:41 AM
You could instantiate a prefab of a bullet with a script attached that has a Vector3 variable, set that Vector3 variable to hit.point, and then make the script attached to the bullet do Vector3.MoveTowards that variable.
Your answer
 
             Follow this Question
Related Questions
Launching a Projectile to a Raycast 1 Answer
Question about FPS and Raycasting Javascript 2 Answers
Setting Scroll View Width GUILayout 1 Answer
Raycast Pause Between Hits? 0 Answers
I need help with Javascript 1 Answer