size of image 56x56 . here is a code for example
Code: Select all
function love.load()
love.graphics.setLineWidth(2)
world = love.physics.newWorld(-650, -650, 650, 650)
world:setGravity(0, 150)
boximage = love.graphics.newImage("love_cube.png")
boxbody = love.physics.newBody(world, 150, 0, 150 , 45)
boxshape = love.physics.newRectangleShape(boxbody , 150, 0, 56, 56,9)
end
function love.update(dt)
world:update(dt)
end
function love.draw()
love.graphics.polygon("line", v.s:getPoints())
love.graphics.draw(v.i, boxbody :getX(), boxbody :getY(), boxbody :getAngle(), 1, 1, 28, 28)
end