How do I offset a bullet from my player?

So I copied this from a yt video so I have no idea what I’m looking at

GameObject instCharge1 = Instantiate(Charge1, transform.position, Quaternion.identity) as GameObject;
Rigidbody2D instCharge1Rigidbody2D = instCharge1.GetComponent();
instCharge1Rigidbody2D.AddForce(Vector3.forward * speed1);

Anyway, the bullet Charge1spawns inside the player, so the only way to spawn one is when I’m going fast enough for the game to not keep up. It’s a 2d game, both player and bullet have Rigidbody2D/BoxCollider. I just need to know what part I can tweak for x/y offsets.


In the class fields of the shooter, have something like public Transform bulletSpawnPoint;.
Create a new empty GameObject as a child of the gun barrel (or wherever the bullets spawn from), and assign the new gameObject to the bulletSpawnPoint.

Then change the code to Instantiate(Charge1, bulletSpawnPoint.position, Quaternion.identity).