I have been going nuts over this, I checked all of my things to make sure collision is not to blame, and I made sure the bullet had a ridged body, and I’v tried 5 different codes, but all they do is fall down. I even changed the rotation of the bullet to make sure “Forward” wasn’t down, but they still all fall. T_T
using UnityEngine;
using System.Collections;
public class Shoot : MonoBehaviour {
public float bspeed = 500;
public Transform shootfrom;
public Rigidbody bullitt;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown(KeyCode.LeftShift))
{
Rigidbody shooting;
shooting = Instantiate(bullitt,shootfrom.position,transform.rotation)as Rigidbody;
shooting.velocity = transform.forward * bspeed;
}
}
}