Answer the question
In order to leave comments, you need to log in
Vector3.forward, what's wrong?
Hello dear. The question is this: there is a simple code that creates a bullet, the position of which is set next to the barrel, and the rotation is done like the player to whom the weapon is attached.
BulletInstance = Instantiate(bullet, gunOne.transform.position, player.transform.rotation);
//BulletInstanceTwo = Instantiate(bullet, gunTwo.transform.position, player.transform.rotation);
BulletInstance.GetComponent<Rigidbody>().AddForce(Vector3.forward * 1000);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question