How exactly do I fix this?

1a. For example if tile is a square 1 by 1 with the center in the (0.5, 0.5), then take the points (a, b , c , d, e), wherejumptrigger wrote: ↑Sat Jul 30, 2022 4:55 pm So?
1. rotate by center of sprite
1a. find what color was at the 4 points when not rotated, but which 4 points?
1b. not sure what you mean
Code: Select all
pointA = {0.5, 0.5} -- center
-- (yet not rotated, in target tiles coordinate system)
pointB = {0.5+0.5*math.cos(math.pi/4), 0.5+0.5*math.sin(math.pi/4)}
pointC = {0.5+0.5*math.cos(math.pi/4+math.pi/2), 0.5+0.5*math.sin(math.pi/4+math.pi/2)}
pointD = {0.5+0.5*math.cos(math.pi/4+2*math.pi/2), 0.5+0.5*math.sin(math.pi/4+2*math.pi/2)}
pointE = {0.5+0.5*math.cos(math.pi/4+3*math.pi/2), 0.5+0.5*math.sin(math.pi/4+3*math.pi/2)}
Users browsing this forum: No registered users and 4 guests