When I press the space bar, a bullet is supposed to spawn and start flying off. But instead, a bullet spawns and then stays put. This problem is only true for the player though, and not other objects I have spawning bullets. Their bullets spawn and fly off like they’re supposed to. The bullets have a constant relative force of 100 z, a drag of 10, and an angular drag of 0.05. Here is my script that spawns the bullets:
using UnityEngine;
using System.Collections;
public class BulletController : MonoBehaviour {
public GameObject BulletSpawn;
public GameObject Bullet;
void Update()
{
if (Input.GetKeyDown("space") == true)
{
Instantiate(Bullet, BulletSpawn.transform.position, BulletSpawn.transform.rotation);
}
}
}
Here is a picture of my original bullet’s components:
https://drive.google.com/open?id=0B_HzgsC9lP3nNlAyS0tweGRtckE
And here is a picture of the clone’s components:
https://drive.google.com/open?id=0B_HzgsC9lP3ncnBTT2NRTk1mR2s
(I don’t know how to insert images)
What is wrong with my bullets?