Weapon not firing straight.

Bullet moving script (in a FixedUpdate function):

transform.Translate(transform.forward* bulletSpeed * Time.fixedDeltaTime, Space.Self);

Bullet spawning script:

Instantiate(bulletPrefab, spawnPoint.transform.position, spawnPoint.transform.rotation);

If I’m facing one direction it fires fine but as I turn the bullets fire in a completely different direction. The spawn point is a child of the player so it is rotating with the player.

Any help?

Try changing this:

 transform.Translate(transform.forward* bulletSpeed * Time.fixedDeltaTime, Space.Self);

to this:

transform.Translate(transform.forward* bulletSpeed * Time.fixedDeltaTime, Space.World);

When you are supplying transform.forward in translate, you are dealing with the object’s direction with respect to world coordinate (Space.world). Therefore, using Space.Self as the relative space is causing inconsistency.