Hi all,
I want to shoot a bullet from an object moving in the direction of motion.
I wrote this script but the bullet don’t match the direction of movement of the object,Hi all,
I want to shoot a bullet from an object moving in the direction of motion.
I wrote this script but the bullet don’t match the direction of movement of the object.
if (Input.GetKeyDown("space"))
{
Instantiate(bullet, new Vector3(gameObject.transform.position.x, 3, gameObject.transform.position.z), Quaternion.identity);
}