I'm trying to use World:queryBoundingBox(), but it doesn't seem to find anything. using windfield's query functions does work, and though I can't tell what I'm not doing that they are, I can't get it to work for myself. a minimal example is:
Code: Select all
function love.load(arg)
midx = love.graphics.getWidth()/2
midy = love.graphics.getHeight()/2
w = love.physics.newWorld()
bod = love.physics.newBody(w, midx, midy, 'dynamic')
shp = love.physics.newCircleShape(midx, midy, 10)
fix = love.physics.newFixture(bod, shp, 1)
callback = function(fixture)
print(fixture)
return true
end
w:queryBoundingBox(midx +10, midy + 10, midx - 10, midy - 10 , callback)
end
function love.update(dt)
end
function love.draw()
end