Radial Menu lines are acting odd.
Posted: Fri Jun 21, 2019 3:04 am
I'm in the early stages of making a radial menu and I'm having some weird lines out of my circle and can't figure out why. What is going on with this code to cause the lines. Also 6 segments and above has a missing section. I'm sure I could figure that one out but if you fix it in the process I wouldn't complain. I'll post my segment functions below.
segments: 2, 4, 6*, 10 and more after that have the weird line.
segment 6 also is having a wierd issue with the background segment not matching perfectly too.
Thank you in advance.
segments: 2, 4, 6*, 10 and more after that have the weird line.
segment 6 also is having a wierd issue with the background segment not matching perfectly too.
Thank you in advance.
Code: Select all
function drawFillSegment(segments, x, y, radius)
love.graphics.setLineStyle("smooth")
local p2 = math.pi*2
local slice = p2 / segments
for i = 1, segments do
love.graphics.arc("fill", x, y, radius, p2 * slice, slice * i)
end
end
function drawLineSegments(segments, x, y, radius)
love.graphics.setLineStyle("smooth")
local p2 = math.pi*2
local slice = p2 / segments
for i = 1, segments do
love.graphics.arc("line", x, y, radius, p2 + slice, slice * i)
end
end