0

my bullets are coming from behind my ship and slightly to the left. I followed a tutorial but I cannot figure out why it is doing it. The bullets also won't go all the way to the end of my screen.

Sorry if I have posted this in the wrong format or whatever :)

Thanks, Baccy.

http://pastebin.com/5L4dm9Lj

Fixed it! I changed the size of my sprite and now its firing from the correct position.

Baccy
  • 13
  • 4

1 Answers1

0

I'd try changing your bullet position line to:

newBullet.bulletPosition = new Vector2(playerPos.X + (playerSprite.Width/2) - (newBullet.bulletTexture.Width / 2), playerPos.Y + (playerSprite.Height/2));

Joshua Mee
  • 582
  • 5
  • 20
  • Its doing the same thing, is it because I set a player position in another class (its a starting position) and its using them coordinates to shoot from instead of the sprite? – Baccy Dec 29 '15 at 16:15