Answer the question
In order to leave comments, you need to log in
Unity Vector3.forward, what's wrong, how can this not work?
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);
BulletInstance.GetComponent().AddForce(Vector3.forward * 1000);
Everything would seem simple, but the bullets fly only in one direction.
What could be wrong?
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