I am trying to make a completely realistic FPS game. I want to control the exact speed the bullet comes out at. But when I use Time.deltaTime and the correct Meters per second number, it only shoots the bullet about a meter in front of the person.
var MPS : int = 137;
var BB : Rigidbody;
var automaticWeapon : boolean = false;
var semiAutoWeapon : boolean = true;
var lastShot;
var shotInterval : float = .1f;
var deleteBulletTime = 4.5;
function Update ()
{
if(semiAutoWeapon == true)
{
if(Input.GetButtonDown('Fire1'))
{
var instantiatedBB : Rigidbody = Instantiate(BB, transform.position, transform.rotation);
instantiatedBB.velocity = transform.TransformDirection(Vector3( 0, 0, MPS * Time.deltaTime ));
Physics.IgnoreCollision( instantiatedBB. collider, transform.root.collider );
}
}
}