- Home /
 
 
               Question by 
               HolBol · Nov 02, 2010 at 04:48 PM · 
                instantiateinput  
              
 
              cannon script is not working, no errors.
I have this very simple script to launch a projectile. The instantiated object has a constant force component applied to it.
 var projectile : Rigidbody;
 
               function Update() {
 
               if( Input.GetButtonDown("Fire1") ) {
 
               Instantiate(projectile, transform.position, transform.rotation );
 
               } } 
 
               
               But oddly, when i hit the fire1 key, absolutely noting happens. Help!
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Atnas1010 · Nov 02, 2010 at 05:00 PM
Have you tried putting a print in the if statement and see if it gets printed?
dw, i fixed it- not sure what the error was, but i used an older version ins$$anonymous$$d.
Your answer