Hi, was attempting to be able to turn the angle of this sprite hoping it will turn according to my touch. For example, if I were to touch 200, 200, it would point that way. If dragging finger it would follow. Started this code but won’t seem to work. Any ideas?
-- Use this function to perform your initial setup
function setup()
displayMode(FULLSCREEN)
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(255, 255, 255, 255)
-- This sets the line thickness
strokeWidth(5)
A=WIDTH
b=HEIGHT -- Do your drawing here
sprite("Tyrian Remastered:Boss D", 100, HEIGHT*1/2, 100, 100)
function touched(touch)
if touch.state ~= MOVING then rotate=(CurrentTouch.y-HEIGHT*1/2, CurrentTouch.x -100)
end
end
end