I'm getting a very frustrating Box2D assertion when I use love.physics.newPolygonShape with a very simple rectangle. I've attached a simple test program that demonstrates the issue. I'm using Löve2d 9.2.
Code: Select all
-- 4
-- 3
-- 1
-- 2
function love.load()
world = love.physics.newWorld(0,981,true)
body = love.physics.newBody(world, 2, 3, "dynamic")
shape = love.physics.newPolygonShape(1, 3, 2, 4, 4, 2, 3, 1)
fixture = love.physics.newFixture(body,shape,1)
end
The following polygon does work:
Code: Select all
--local r = {295.01065732359, 500.32628156143, 304.98934267641, 499.67371843857, 301.47705992829, 449.79660575252, 291.9973088431, 450.41654071923 }
local r = {2, 4, 4, 3, 3, 1, 1, 2 }
-- 3
-- 4
-- 2
-- 1
Any help, please?