- Home /
FPS Shoooting Problem
Hi,I'm creating a simple FPS game,everything went pretty good but the shooting is not working,when I shoot the bullet just floats in front of me,and there's no sound at all(I've put the sound in correctly),can someone help?This is my Gun script.
var Bullet : Rigidbody;
var Spawn : Transform;
var BulletSpeed = 100000;
function Update () {
if(Input.GetButtonDown("Fire1")){
Fire();
}
}
function Fire () {
var bullet1 : Rigidbody = Instantiate(Bullet,Spawn.position,Spawn.rotation);
bullet1.AddForce(transform.foward *BulletSpeed);
audio.Play();
}
Comment
Answer by Cat_Kocat · Jun 18, 2014 at 01:49 PM
i think the problem when you put that bullet. u must put the bullet infront of the spawn/gun. get rigidbody, done. is that ur problem ?
Your answer
Follow this Question
Related Questions
How to add sound to gun shot script 4 Answers
How can I shoot bullets that you can aim with the crosshair? 1 Answer
Shooting script problem. 2 Answers
Shooting and health Help 0 Answers
Need help with bullet/gun scripting 3 Answers