I've seen questions like this that usually end up with the OP having confused localposition and world position. This is not the case.
My enemy is animated. He holds a gun. This gun has a child, called "shootpoint" which is where the bullet comes from.
When firing, I instantiate a empty gameobject at this shootpoint. Using the shootpoint's transform.position. The enemy is stood on the ground, so the shootpoint position is pretty low.
Here is the code that I am using to instantiate this.
GameObject g = new GameObject(); g.transform.position = bulletSpawnPoint.position;
This object (and the weapon's bullets) appear very high up. Far away from the position. Attached is a image, showing the point that the bullets (and the gameobject) are coming from. Selected, is where they should be coming from. They are instantiated in world space, using its transform.position. Here is a image.
Unity is bugged. I have no idea what to do now. How would I even fix this? Could it be the animator? Why doesn't it line up?