hi, i’m searching to guide rectangle as a radius of the circle.
But that don’t work…Could you help me please ?
local circlecenter=display.newCircle(100,100,10) --the center local function draw(posx,posy) local Rect=display.newRect(posx,posy,100,10) X=Rect.x-circlecenter.x Y=Rect.y-circlecenter.y V=math.atan2(X,Y)--angle in radian P=math.deg(V) --angle in degree Rect.rotation=P --orientation of my rect print(P) end draw(400,40)
