I'm creating a laser effect based on drawing a Line2D. It's a board element that has a fixed start and end location. I used a 32x32 sprite, where the laser port is halfway down one side of the sprite and should shoot across the sprite maybe across more than just the sprite itself.
When I'm not shooting I remove the points from the Line2D - perfect the laser line disappears. But when I use Vector2D(16,0) as the start point the line starts in the middle of my sprite. Some experimentation says I need (-8,0) as the start point.
Where does this magic number -8 come from when my sprite is 32x32?
The second endpoint to create a horizontal line that spans the sprite length turns out to be (16,0). Why is the distance only 24 rather than my expected 32?
My sprite is 32x32 and covers 4 grid points by 4 grid points in the 2D editor.
What concept am I missing?