r/UnityHelp • u/FamiliarDog6598 • Mar 14 '23
Can you help me fps shoot bullet direction problem
Hi guys! I am making a simple fps game from this youtube video https://youtu.be/OFXvvuxqPNQ
There is a error that my bullet doesn't go forward,it goes to the left direction can you help me please
3
Upvotes
1
u/FamiliarDog6598 Mar 14 '23
void Shoot
Debug.Log("shoot!");
GameObject bullet = Instantiate(bulletprefab, bulletpoint.transform.position, transform.rotation); bullet.GetComponent<Rigidbody>().AddForce(transform.forward- bulletSpeed); Destroy(bullet, 1);
I used same script from video