Hi dyson,
I am trying to shoot a laser beam between two sprites on a map. I can’t seem to get to the center of the sprites, the beam is quite unpredictable. Using sprite .x and .y doesn’t find the center of the sprite. Is there something that I am missing?
I am doing this this:
local px, py = mte.locToScreenPos(player.locX, player.locY, 1)
local px2, py2 = mte.locToScreenPos(k1.locX, k1.locY, 1)
local beam = display.newLine(px,py, px2, py2)
It works until I move a sprite, then the x and y’s get messed up.
Thanks, Greg