Hi.
I am shooting a bullet from my car. I have this script:
var BulletPrefab:Transform;
var force : float = 2000;
//var canShoot:boolean = true;
function FixedUpdate()
{
if(Input.GetButton("Fire1"))
{
var bullet = Instantiate(BulletPrefab,transform.position,Quaternion.Euler(90,0,0));
d bullet.rigidbody.AddRelativeForce(Vector3(0, 0, 1) * force);
// Debug.Log("Relitave force");
// Physics.IgnoreCollision( bullet.collider,transform.root.collider );
}
}
And attatched it to two children of my car object, BulletL and BulletR. Even when I try changing the Vector and such, the bullet still shoots on the Z axis.
How do I fix this?