When I use it for the first time, it will be placed one pixel below the intended position, and then subsequent ones will be in the correct position, which is the center of the ship object. If I keep firing, it will be correct, however, if let all of them leave the screen, then I shoot again and again it’s down one line.
Here is the event:
Here is a screenshot of the problem:
Second screenshot showing the correct position:
Not really sure why. Checked the numbers and they seem to read the same, so I don’t know, a problem with the fire a bullet behavior?
Please let me know if I can fix this?
Quick Edit: After further inspection, it seems to be a problem with Bullet.Height() – not sure why, but I’ve narrowed it down to that. I tried logging it to the console, but it’s reporting the proper height of 10, but I use ToString(Bullet.Height()) and it correctly reports the height, so I don’t know if there’s some floating point problem there or not. To sum up Bullet.Height() seems to be the culprit.