Skip to content
This repository was archived by the owner on Mar 10, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions windfield/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ end
function World:draw(alpha)
-- get the current color values to reapply
local r, g, b, a = love.graphics.getColor()
local linewidth = love.graphics.getLineWidth()
-- alpha value is optional
alpha = alpha or 255
-- Colliders debug
love.graphics.setColor(222, 222, 222, alpha)
love.graphics.setLineWidth(1)
local bodies = self.box2d_world:getBodies()
for _, body in ipairs(bodies) do
local fixtures = body:getFixtures()
Expand Down Expand Up @@ -132,6 +134,7 @@ function World:draw(alpha)
end
end
love.graphics.setColor(r, g, b, a)
love.graphics.setLineWidth(linewidth)
end

function World:setQueryDebugDrawing(value)
Expand Down